Skip to content

Commit

Permalink
Update dependency GoogleContainerTools/skaffold to v2.9.0 (#51)
Browse files Browse the repository at this point in the history
* Update dependency GoogleContainerTools/skaffold to v2.9.0

* Add target for upgrading `skaffold.yaml`

* Upgrade skaffold configuration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tim Ebert <[email protected]>
  • Loading branch information
renovate[bot] and timebertt authored Dec 22, 2023
1 parent dba7b7f commit e5ef59c
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 85 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ test: $(SETUP_ENVTEST) ## Run tests.
test-kyverno: $(KYVERNO) ## Run kyverno policy tests.
$(KYVERNO) test --remove-color -v 4 .

.PHONY: skaffold-fix
skaffold-fix: $(SKAFFOLD) ## Upgrade skaffold configuration to the latest apiVersion.
$(SKAFFOLD) fix --overwrite
[ ! -f $(SKAFFOLD_FILENAME).v2 ] || rm $(SKAFFOLD_FILENAME).v2

##@ Verification

.PHONY: lint
Expand Down
168 changes: 84 additions & 84 deletions hack/config/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: cert-manager
Expand All @@ -15,22 +15,22 @@ deploy:
defaultNamespace: ""
hooks:
after:
- host:
command:
- /usr/bin/env
- bash
- -c
- |
for i in $(seq 1 20); do
if [ "$(kubectl get validatingwebhookconfiguration cert-manager-webhook -oyaml 2>/dev/null | yq '.webhooks[].clientConfig.caBundle')" != "null" ] ; then
exit 0
fi
echo "Waiting until CA has been injected into cert-manager webhook"
sleep 5
done
exit 1
- host:
command:
- /usr/bin/env
- bash
- -c
- |
for i in $(seq 1 20); do
if [ "$(kubectl get validatingwebhookconfiguration cert-manager-webhook -oyaml 2>/dev/null | yq '.webhooks[].clientConfig.caBundle')" != "null" ] ; then
exit 0
fi
echo "Waiting until CA has been injected into cert-manager webhook"
sleep 5
done
exit 1
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: cert-manager-resources
Expand All @@ -46,7 +46,7 @@ deploy:
- --force-conflicts
defaultNamespace: ""
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: ingress-nginx
Expand Down Expand Up @@ -86,7 +86,7 @@ profiles:
paths:
- hack/config/ingress-nginx/shoot
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: kyverno
Expand All @@ -103,29 +103,29 @@ deploy:
defaultNamespace: ""
hooks:
after:
- host:
command:
- /usr/bin/env
- bash
- -c
- |
for i in $(seq 1 20); do
# create dummy policy with dry-run enabled to test availability of webhook
if kubectl create --raw "/apis/kyverno.io/v1/clusterpolicies?dryRun=All" -f <(echo '{"apiVersion": "kyverno.io/v1", "kind": "ClusterPolicy", "metadata": {"name": "test"}, "spec": {}}') >/dev/null ; then
exit 0
fi
echo "Waiting until kyverno webhook is ready to handle policy creation"
sleep 5
done
exit 1
- host:
command:
- /usr/bin/env
- bash
- -c
- |
for i in $(seq 1 20); do
# create dummy policy with dry-run enabled to test availability of webhook
if kubectl create --raw "/apis/kyverno.io/v1/clusterpolicies?dryRun=All" -f <(echo '{"apiVersion": "kyverno.io/v1", "kind": "ClusterPolicy", "metadata": {"name": "test"}, "spec": {}}') >/dev/null ; then
exit 0
fi
echo "Waiting until kyverno webhook is ready to handle policy creation"
sleep 5
done
exit 1
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: policy
requires:
- configs:
- kyverno
- configs:
- kyverno
profiles:
- name: shoot
activation:
Expand All @@ -142,77 +142,77 @@ profiles:
- --force-conflicts
defaultNamespace: ""
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: sharder
build:
artifacts:
- image: ghcr.io/timebertt/kubernetes-controller-sharding/sharder
ko:
dependencies:
paths:
- go.mod
- '**/*.go'
main: ./cmd/sharder
- image: ghcr.io/timebertt/kubernetes-controller-sharding/sharder
ko:
dependencies:
paths:
- go.mod
- '**/*.go'
main: ./cmd/sharder
local:
concurrency: 0
manifests:
kustomize:
paths:
- config/default
- config/default
hooks:
before:
- host:
command:
# ensure deepcopy, CRDs, and RBAC are up-to-date
- make
- generate-fast
- host:
# ensure deepcopy, CRDs, and RBAC are up-to-date
command:
- make
- generate-fast
deploy:
kubectl:
flags:
apply:
- --server-side
- --force-conflicts
- --server-side
- --force-conflicts
defaultNamespace: ""
profiles:
- name: kind
activation:
- kubeContext: kind-.*
patches:
- op: replace
path: /manifests/kustomize/paths/0
value: hack/config/sharder/local
- name: kind
activation:
- kubeContext: kind-.*
patches:
- op: replace
path: /manifests/kustomize/paths/0
value: hack/config/sharder/local
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: shard
build:
artifacts:
- image: ghcr.io/timebertt/kubernetes-controller-sharding/shard
ko:
dependencies:
paths:
- go.mod
- '**/*.go'
main: ./cmd/shard
- image: ghcr.io/timebertt/kubernetes-controller-sharding/shard
ko:
dependencies:
paths:
- go.mod
- '**/*.go'
main: ./cmd/shard
local:
concurrency: 0
manifests:
kustomize:
paths:
- hack/config/shard/clusterring
- hack/config/shard/shard
- hack/config/shard/clusterring
- hack/config/shard/shard
deploy:
kubectl:
flags:
apply:
- --server-side
- --force-conflicts
- --server-side
- --force-conflicts
defaultNamespace: ""
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: monitoring-crds
Expand All @@ -228,7 +228,7 @@ deploy:
- --force-conflicts
defaultNamespace: ""
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: monitoring
Expand Down Expand Up @@ -268,23 +268,23 @@ profiles:
activation:
- kubeContext: .*--sharding.*
patches:
- op: replace
path: /manifests/kustomize/paths/0
value: hack/config/monitoring/shoot
- op: replace
path: /manifests/kustomize/paths/0
value: hack/config/monitoring/shoot
---
apiVersion: skaffold/v4beta7
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: profiling
build:
artifacts:
- image: ghcr.io/timebertt/kubernetes-controller-sharding/janitor
ko:
dependencies:
paths:
- go.mod
- './hack/cmd/janitor/**/*.go'
main: ./hack/cmd/janitor
- image: ghcr.io/timebertt/kubernetes-controller-sharding/janitor
ko:
dependencies:
paths:
- go.mod
- ./hack/cmd/janitor/**/*.go
main: ./hack/cmd/janitor
local:
concurrency: 0
manifests:
Expand Down
2 changes: 1 addition & 1 deletion hack/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $(SETUP_ENVTEST): go.mod

SKAFFOLD := $(TOOLS_BIN_DIR)/skaffold
# renovate: datasource=github-tags depName=GoogleContainerTools/skaffold
SKAFFOLD_VERSION ?= v2.8.0
SKAFFOLD_VERSION ?= v2.9.0
$(SKAFFOLD): $(call tool_version_file,$(SKAFFOLD),$(SKAFFOLD_VERSION))
curl -Lo $(SKAFFOLD) https://storage.googleapis.com/skaffold/releases/$(SKAFFOLD_VERSION)/skaffold-$(shell uname -s | tr '[:upper:]' '[:lower:]')-$(shell uname -m | sed 's/x86_64/amd64/')
chmod +x $(SKAFFOLD)
Expand Down
6 changes: 6 additions & 0 deletions webhosting-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ test: $(SETUP_ENVTEST) ## Run tests.
test-kyverno: $(KYVERNO) ## Run kyverno policy tests.
$(KYVERNO) test --remove-color -v 4 .

.PHONY: skaffold-fix
skaffold-fix: $(SKAFFOLD) ## Upgrade skaffold configuration to the latest apiVersion.
$(SKAFFOLD) fix --overwrite
[ ! -f $(SKAFFOLD_FILENAME).v2 ] || rm $(SKAFFOLD_FILENAME).v2

##@ Verification

.PHONY: vet
Expand Down Expand Up @@ -118,6 +123,7 @@ images: $(KO) ## Build and push container images using ko.

##@ Deployment

export SKAFFOLD_FILENAME = skaffold.yaml
# use static label for skaffold to prevent rolling all components on every skaffold invocation
deploy up dev down: export SKAFFOLD_LABEL = skaffold.dev/run-id=webhosting-operator
# use dedicated ghcr repo for dev images to prevent spamming the "production" image repo
Expand Down

0 comments on commit e5ef59c

Please sign in to comment.