Skip to content

Commit fb6b612

Browse files
authored
Merge branch 'master' into fix-example
2 parents b97a921 + b72657c commit fb6b612

File tree

98 files changed

+2552
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2552
-456
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ensure that git would checkout files with lf instead of crlf on windows
2+
*.formatted text eol=lf
3+
*.yml text eol=lf

.github/workflows/ci.yaml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,30 @@ on:
55
branches:
66
- master
77
jobs:
8-
build:
8+
build-linux:
99
name: Build
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Set up Go 1.14
13-
uses: actions/setup-go@v1
12+
- uses: actions/setup-go@v2
1413
with:
15-
go-version: 1.14
14+
go-version: 1.15
1615
id: go
1716

18-
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v1
17+
- uses: azure/setup-helm@v1
18+
with:
19+
version: "v3.3.1" # default is latest stable
20+
id: helm
21+
22+
- uses: actions/checkout@v2
2023

2124
- name: Install command dependencies
2225
run: |
2326
mkdir -p $HOME/go/bin
2427
export GOPATH=$HOME/go
25-
echo "::set-env name=GOPATH::$HOME/go"
26-
echo "::set-env name=GO_VERSION::$(go version | awk '{ print $3}' | sed 's/^go//')"
27-
echo "::add-path::$HOME/go/bin"
28-
make install-ci install
28+
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
29+
echo "GO_VERSION=$(go version | awk '{ print $3}' | sed 's/^go//')" >> $GITHUB_ENV
30+
echo "$HOME/go/bin" >> $GITHUB_PATH
31+
make install-ci create-cluster install
2932
3033
- name: Build
3134
run: make build
@@ -34,16 +37,44 @@ jobs:
3437
run: make lint
3538

3639
- name: Test
37-
run: TEST_FLAGS="-tags integration" make test
40+
run: make test TEST_FLAGS="-tags integration"
3841

3942
- name: Coverage Report
4043
run: make publish-coverage
4144
env:
4245
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4346

4447
- name: goreleaser
45-
uses: goreleaser/goreleaser-action@master
48+
uses: goreleaser/goreleaser-action@v2
4649
with:
4750
args: release --snapshot --skip-publish --rm-dist --release-notes .release-notes.md
4851
env:
4952
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+
build-windows:
55+
name: Build(Windows)
56+
runs-on: windows-latest
57+
steps:
58+
- uses: actions/setup-go@v2
59+
with:
60+
go-version: 1.15
61+
id: go
62+
63+
- uses: azure/setup-helm@v1
64+
with:
65+
version: "v3.3.1" # default is latest stable
66+
id: helm
67+
68+
- uses: actions/checkout@v2
69+
70+
- name: Install command dependencies
71+
run: |
72+
echo "GOPATH=$HOME/go" >> $GITHUB_ENV
73+
echo "GO_VERSION=$(go version | awk '{ print $3}' | sed 's/^go//')" >> $GITHUB_ENV
74+
echo "$HOME/go/bin" >> $GITHUB_PATH
75+
76+
- name: Build
77+
run: make build
78+
79+
- name: Test
80+
run: make test

.github/workflows/release.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111
name: goreleaser
1212
steps:
13-
- name: Set up Go 1.14
14-
uses: actions/setup-go@v1
13+
- uses: actions/setup-go@v2
1514
with:
16-
go-version: 1.14
15+
go-version: 1.15
1716
id: go
18-
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v1
17+
- uses: actions/checkout@v2
2018
- name: Install package dependencies
2119
run: |
22-
echo "::set-env name=GO_VERSION::$(go version | awk '{ print $3}' | sed 's/^go//')"
20+
echo "GO_VERSION=$(go version | awk '{ print $3}' | sed 's/^go//')" >> $GITHUB_ENV
2321
make get
2422
- name: Release via goreleaser
25-
uses: goreleaser/goreleaser-action@master
23+
uses: goreleaser/goreleaser-action@v2
2624
with:
2725
args: release --rm-dist --release-notes .release-notes.md
2826
env:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ coverage.txt
77
dist/
88
helm.tar.gz
99
linux-amd64/
10+
darwin-amd64/
1011
bin/
1112
.release-notes.md
1213
.tools/
14+
.vscode/

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ archives:
3535

3636
brews:
3737
- name: qbec
38-
github:
38+
tap:
3939
owner: splunk
4040
name: homebrew-tap
4141
url_template: https://github.com/splunk/qbec/releases/download/{{.Tag}}/{{.ArtifactName}}

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,64 @@
11
Changelog
22
---
33

4+
## v0.13.3 (Dec 23, 2020)
5+
6+
* Add ability to add the component name as a label in addition to the existing annotation. This is opt-in and is activated
7+
by setting the `addComponentLabel` property to `true` in qbec.yaml (thanks @korroot and @hudymi).
8+
9+
## v0.13.2 (Dec 3, 2020)
10+
11+
* Allow force options to be set via environment variables (thanks @splkforrest)
12+
13+
## v0.13.1 (Dec 2, 2020)
14+
15+
* Fix a bug where the `alpha fmt` command would stop processing arguments after encountering a directory.
16+
17+
## v0.13.0 (Nov 27, 2020)
18+
19+
* Misc. CI build changes
20+
* Update jsonnet library to `v0.17.0` and k8s client libs to `v1.17.13`
21+
* Add json formatter to the `qbec alpha fmt` command
22+
* Fix diff commands to show skipped updates and deletes based on qbec directives specified for existing objects.
23+
This will no longer show spurious diffs for deletes and updates if those have been turned off.
24+
* Use per-namespace queries by default when multiple namespaces are present, allow using cluster-scoped queries
25+
using an opt-in flag.
26+
* The `--env-file` option now allows http(s) URLs in addition to local files. In addition, the `envFiles` attribute
27+
in `qbec.yaml` can also contain http(s) URLs. (thanks @dan1)
28+
* String data in secrets is now obfuscated in addition to binary data
29+
30+
### Incompatibilities
31+
32+
This release is incompatible from previous minor versions in the following ways:
33+
34+
* `qbec apply` will now wait on all objects by default. That is, the `--wait-all` now defaults to `true`.
35+
To get the previous behavior, you need to add `--wait-all=false` to the `apply` command.
36+
* `qbec diff` now exits 0 by default even when diffs are found. To restore previous behavior, add `--error-exit`
37+
to the command.
38+
* qbec now defaults to per-namespace queries when multiple namespaces are present. To get the previous behavior
39+
of using cluster-scoped queries add `clusterScopedLists: true` under `spec` in `qbec.yaml`
40+
* The command line syntax of the `qbec alpha fmt` command has changed in incompatible ways. Instead of options like
41+
`--jsonnet`, `--yaml` etc. you need to specify options as `--type=jsonnet`, `--type=yaml` and so on.
42+
* YAML formatter now follows `prettier` conventions requiring arrays to be indented under the parent key.
43+
* Any corner-case behavior from updating k8s client and jsonnet libraries.
44+
45+
## v0.12.5 (Oct 2, 2020)
46+
47+
* Add a new `wait-policy` directive to disable waits on specific deployments
48+
and daemonsets. The annotation `"directives.qbec.io/wait-policy": "never"`
49+
will cause qbec to not wait on the deployment even if it has changed.
50+
51+
## v0.12.4 (Sep 24, 2020)
52+
53+
* Add `--wait-all` flag to the `apply` command to wait on all objects instead of just the ones that were changed in the
54+
current run.
55+
56+
## v0.12.3 (Sep 9, 2020)
57+
58+
* Add ability to import a bag of files using a glob pattern (see #153 for details). At this point this should be
59+
considered experimental. Do not rely on it yet until the next release when we will have docs for it.
60+
* Add windows build in CI, thanks to @harsimranmaan
61+
462
## v0.12.2 (Aug 30, 2020)
563

664
* Fix a bug where under certain circumstances of failed discovery, qbec would delete resources not meant to be deleted.

Makefile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include Makefile.tools
22

3-
VERSION := 0.12.2
3+
VERSION := 0.13.3
44
SHORT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo dev)
55
GO_VERSION := $(shell go version | awk '{ print $$3}' | sed 's/^go//')
66

@@ -50,18 +50,26 @@ lint: check-format
5050
.PHONY: check-format
5151
check-format:
5252
@echo "Running gofmt..."
53-
$(eval unformatted=$(shell find . -name '*.go' | grep -v ./.git | grep -v vendor | xargs gofmt -l))
53+
$(eval unformatted=$(shell find . -name '*.go' | grep -v ./.git | grep -v vendor | xargs gofmt -s -l))
5454
$(if $(strip $(unformatted)),\
5555
$(error $(\n) Some files are ill formatted! Run: \
56-
$(foreach file,$(unformatted),$(\n) gofmt -w $(file))$(\n)),\
56+
$(foreach file,$(unformatted),$(\n) gofmt -s -w $(file))$(\n)),\
5757
@echo All files are well formatted.\
5858
)
59+
60+
5961
.PHONY: install-ci
60-
install-ci: .tools/kind
61-
curl -sSL -o helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz
62-
tar -xvzf helm.tar.gz
63-
mv linux-amd64/helm $(GOPATH)/bin/
62+
install-ci: HELM_VERSION := 3.3.1
63+
install-ci: HELM_PLATFORM := $(shell uname| tr '[:upper:]' '[:lower:]')
64+
install-ci:
65+
# Refactor helm install into a separate step
66+
# curl -sSL -o helm.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-${HELM_PLATFORM}-amd64.tar.gz
67+
# tar -xvzf helm.tar.gz
68+
# mv ${HELM_PLATFORM}-amd64/helm $(GOPATH)/bin/
6469
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.21.0
70+
71+
.PHONY: create-cluster
72+
create-cluster: .tools/kind
6573
.tools/kind create cluster
6674

6775
.PHONY: install

examples/test-app/environments/dev.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local base = import './base.libsonnet';
1+
local base = import '_.libsonnet';
22

33
base {
44
components +: {

examples/test-app/environments/prod.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local base = import './base.libsonnet';
1+
local base = import '_.libsonnet';
22

33
base {
44
components +: {

0 commit comments

Comments
 (0)