Skip to content

Commit

Permalink
feat: prow upgrade (#34)
Browse files Browse the repository at this point in the history
* feat: update prow dependencies

Signed-off-by: Georgi Ivanov <[email protected]>

* feat: update prow version and other tweaks

Signed-off-by: Georgi Ivanov <[email protected]>

* feat: set kubeval version to 1.21.0

Signed-off-by: Georgi Ivanov <[email protected]>

* fix: force recheck

Signed-off-by: Georgi Ivanov <[email protected]>

* feat: update toolbox image

Signed-off-by: Georgi Ivanov <[email protected]>

Signed-off-by: Georgi Ivanov <[email protected]>
  • Loading branch information
givanov authored Aug 18, 2022
1 parent 61ff0c3 commit 469156a
Show file tree
Hide file tree
Showing 13 changed files with 4,002 additions and 4,981 deletions.
8 changes: 4 additions & 4 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ presubmits:
containers:
- name: "validate"
imagePullPolicy: IfNotPresent
image: quay.io/ouzi/toolbox:0.1.17
image: quay.io/ouzi/toolbox:0.2.1
command:
- make
args:
Expand All @@ -31,7 +31,7 @@ presubmits:
containers:
- name: "test-package"
imagePullPolicy: IfNotPresent
image: quay.io/ouzi/toolbox:0.1.17
image: quay.io/ouzi/toolbox:0.2.1
command:
- make
args:
Expand All @@ -51,7 +51,7 @@ presubmits:
containers:
- name: "test-semrelease-dryrun"
imagePullPolicy: IfNotPresent
image: quay.io/ouzi/toolbox:0.1.17
image: quay.io/ouzi/toolbox:0.2.1
command:
- make
args:
Expand All @@ -69,7 +69,7 @@ postsubmits:
containers:
- name: "release"
imagePullPolicy: Always
image: quay.io/ouzi/toolbox:0.1.17
image: quay.io/ouzi/toolbox:0.2.1
command:
- make
args:
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ DIST_VERSION ?= canary
RELEASE = $(DIST_DIR)/prow-installer-$(DIST_VERSION).tar.gz

HELM_PLUGIN_DIFF_URL := https://github.com/databus23/helm-diff
HELM_PLUGIN_DIFF_VERSION := v3.0.0-rc.7
HELM_PLUGIN_DIFF_VERSION := v3.5.0

HELM_PLUGIN_MAP_KUBE_APIS_URL := https://github.com/helm/helm-mapkubeapis
HELM_PLUGIN_MAP_KUBE_APIS_VERSION := v0.3.0

.PHONY: init
init:
helm plugin install $(HELM_PLUGIN_DIFF_URL) --version $(HELM_PLUGIN_DIFF_VERSION) || echo "Plugin already installed - nothing to do"
helm plugin install $(HELM_PLUGIN_MAP_KUBE_APIS_URL) --version $(HELM_PLUGIN_MAP_KUBE_APIS_VERSION) || echo "Plugin already installed - nothing to do"
# plugin to handle deprecated apis
helm plugin install https://github.com/hickeyma/helm-mapkubeapis || echo "Plugin already installed - nothing to do"
helm repo add stable https://charts.helm.sh/stable
helm repo add jetstack https://charts.jetstack.io
helm repo add estafette https://helm.estafette.io
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update


.PHONY: deploy
deploy: $(addsuffix -deploy,$($*DIRECTORY:/=))

Expand Down
6 changes: 3 additions & 3 deletions install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL = /usr/bin/env bash -eo pipefail
DRY_RUN ?= false
VALIDATE ?= false

KUBEVAL_OPTS ?= --strict --kubernetes-version 1.16.0 --ignore-missing-schemas
KUBEVAL_OPTS ?= --strict --kubernetes-version 1.21.0 --ignore-missing-schemas

VALUES ?= values.yaml
K8SAPI_DEPRECATED_MAPPINGS ?= k8sapi_deprecated_mappings.yaml
Expand Down Expand Up @@ -139,7 +139,7 @@ ifeq ($(DRY_RUN),true)
--values $(FOLDER)/$(SUBFOLDER)/.values.yaml
else ifeq ($(DRY_RUN),false)
@echo **Migrating deprecated or removed Kubernetes APIs in Helm storage
@helm mapkubeapis --namespace $(NAMESPACE) --mapfile $(K8SAPI_DEPRECATED_MAPPINGS) $(NAME)
@helm mapkubeapis --namespace $(NAMESPACE) --mapfile $(K8SAPI_DEPRECATED_MAPPINGS) $(NAME) || true
@echo **Upgrading helm chart $(CHART) $(NAME) $(VERSION) from $(FOLDER)/$(SUBFOLDER) in $(NAMESPACE)
@helm upgrade \
$(NAME) \
Expand Down Expand Up @@ -189,7 +189,7 @@ ifeq ($(DRY_RUN),true)
--values $(FOLDER)/$(SUBFOLDER)/.values.yaml
else ifeq ($(DRY_RUN),false)
@echo **Migrating deprecated or removed Kubernetes APIs in Helm storage
@helm mapkubeapis --namespace $(NAMESPACE) --mapfile $(K8SAPI_DEPRECATED_MAPPINGS) $(NAME)
@helm mapkubeapis --namespace $(NAMESPACE) --mapfile $(K8SAPI_DEPRECATED_MAPPINGS) $(NAME) || true
@echo **Upgrading helm chart $(CHART) $(NAME) $(VERSION) from $(FOLDER)/$(SUBFOLDER) in $(NAMESPACE)
@helm upgrade \
$(NAME) \
Expand Down
30 changes: 29 additions & 1 deletion k8sapi_deprecated_mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,32 @@ mappings:
- deprecatedAPI: "apiVersion: apps/v1beta2\nkind: Deployment"
newAPI: "apiVersion: apps/v1\nkind: Deployment"
deprecatedInVersion: "v1.9"
removedInVersion: "v1.16"
removedInVersion: "v1.16"
- deprecatedAPI: "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRole"
newAPI: "apiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding"
newAPI: "apiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role"
newAPI: "apiVersion: rbac.authorization.k8s.io/v1\nkind: Role"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding"
newAPI: "apiVersion: rbac.authorization.k8s.io/v1\nkind: RoleBinding"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: autoscaling/v2beta1\nkind: HorizontalPodAutoscaler"
newAPI: "apiVersion: autoscaling/v2beta2\nkind: HorizontalPodAutoscaler"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: policy/v1beta1\nkind: PodDisruptionBudget"
newAPI: "apiVersion: policy/v1\nkind: PodDisruptionBudget"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.22"
- deprecatedAPI: "apiVersion: batch/v1beta1\nkind: CronJob"
newAPI: "apiVersion: batch/v1\nkind: CronJob"
deprecatedInVersion: "v1.21"
removedInVersion: "v1.25"
Loading

0 comments on commit 469156a

Please sign in to comment.