Skip to content

Commit a543953

Browse files
authored
Various cleanup (#44)
- Fixes toleration indentation ref: kubedb/installer#58 - Use image pull secrets via deployment - Add pod & container security context - Use {{with}} & some formatting cleanup - Use Go 1.14 and kubectl v1.17 - Update Values schema - Test against Kubernetes v1.18.0 - Update labels to match current Helm best practices. I ran `helm create stash` and copied the label and selector templates it generated. - Add values openapi v3 schema Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent b6e2bec commit a543953

27 files changed

+2891
-314
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616

17-
- name: Set up Go 1.13
17+
- name: Set up Go 1.14
1818
uses: actions/setup-go@v1
1919
with:
20-
go-version: 1.13
20+
go-version: 1.14
2121
id: go
2222

2323
- name: Check out code into the Go module directory
@@ -27,6 +27,14 @@ jobs:
2727
run: |
2828
sudo apt-get -qq update || true
2929
sudo apt-get install -y bzr
30+
# install yq
31+
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
32+
chmod +x yq
33+
sudo mv yq /usr/local/bin/yq
34+
# install kubectl
35+
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
36+
chmod +x ./kubectl
37+
sudo mv ./kubectl /usr/local/bin/kubectl
3038
make ci
3139
3240
kubernetes:
@@ -35,7 +43,7 @@ jobs:
3543
needs: build
3644
strategy:
3745
matrix:
38-
k8s: [v1.11.10, v1.12.10, v1.13.10, v1.14.6, v1.15.3, v1.16.3, v1.17.0]
46+
k8s: [v1.11.10, v1.12.10, v1.13.12, v1.14.10, v1.15.7, v1.16.4, v1.17.2, v1.18.0]
3947
steps:
4048

4149
- name: Check out code into the Go module directory

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
6161
BASEIMAGE_PROD ?= gcr.io/distroless/static
6262
BASEIMAGE_DBG ?= debian:stretch
6363

64-
GO_VERSION ?= 1.13.5
64+
GO_VERSION ?= 1.14.2
6565
BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION)
66-
CHART_TEST_IMAGE ?= quay.io/helmpack/chart-testing:v3.0.0-beta.1
66+
CHART_TEST_IMAGE ?= quay.io/helmpack/chart-testing:v3.0.0-rc.1
6767

6868
OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
6969
ifeq ($(OS),windows)
@@ -223,8 +223,13 @@ gen-bindata:
223223
$(BUILD_IMAGE) \
224224
go-bindata -ignore=\\.go -ignore=\\.DS_Store -mode=0644 -modtime=1573722179 -o bindata.go -pkg crds ./...
225225

226+
.PHONY: gen-values-schema
227+
gen-values-schema:
228+
@yq r api/crds/installer.stash.appscode.com_stashoperators.yaml spec.validation.openAPIV3Schema.properties.spec > /tmp/stash-values.openapiv3_schema.yaml
229+
@yq d /tmp/stash-values.openapiv3_schema.yaml description > charts/stash/values.openapiv3_schema.yaml
230+
226231
.PHONY: manifests
227-
manifests: gen-crds patch-crds label-crds gen-bindata
232+
manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema
228233

229234
.PHONY: gen
230235
gen: clientset gen-crd-protos manifests openapi
@@ -339,7 +344,7 @@ lint: $(BUILD_DIRS)
339344
--env GO111MODULE=on \
340345
--env GOFLAGS="-mod=vendor" \
341346
$(BUILD_IMAGE) \
342-
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default --skip-dirs=client,vendor
347+
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=30m --skip-files="generated.*\.go$\" --skip-dirs-use-default --skip-dirs=client,vendor
343348

344349
$(BUILD_DIRS):
345350
@mkdir -p $@

api/crds/bindata.go

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

api/crds/installer.stash.appscode.com_stashoperators.yaml

Lines changed: 410 additions & 1 deletion
Large diffs are not rendered by default.

api/openapi-spec/swagger.json

Lines changed: 244 additions & 3 deletions
Large diffs are not rendered by default.

apis/installer/v1alpha1/generated.pb.go

Lines changed: 752 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/installer/v1alpha1/generated.proto

Lines changed: 45 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/installer/v1alpha1/openapi_generated.go

Lines changed: 82 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)