Skip to content

Commit

Permalink
Merge pull request #571 from nightguide/fix-helm-hooks
Browse files Browse the repository at this point in the history
🌱 Add additional hook post-upgrade
  • Loading branch information
k8s-ci-robot authored Oct 9, 2024
2 parents 9be8125 + 06598ad commit 67a6085
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 118 deletions.
4 changes: 2 additions & 2 deletions hack/charts/cluster-api-operator/templates/addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: {{ $addonNamespace }}
Expand All @@ -37,7 +37,7 @@ metadata:
name: {{ $addonName }}
namespace: {{ $addonNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
{{- if or $addonVersion $.Values.secretName }}
Expand Down
4 changes: 2 additions & 2 deletions hack/charts/cluster-api-operator/templates/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: {{ $bootstrapNamespace }}
---
Expand All @@ -36,7 +36,7 @@ metadata:
name: {{ $bootstrapName }}
namespace: {{ $bootstrapNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
{{- if or $bootstrapVersion $.Values.configSecret.name }}
spec:
Expand Down
4 changes: 2 additions & 2 deletions hack/charts/cluster-api-operator/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: {{ $controlPlaneNamespace }}
---
Expand All @@ -36,7 +36,7 @@ metadata:
name: {{ $controlPlaneName }}
namespace: {{ $controlPlaneNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
{{- if or $controlPlaneVersion $.Values.configSecret.name }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: capi-system
---
Expand All @@ -16,7 +16,7 @@ metadata:
name: cluster-api
namespace: capi-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
{{- with .Values.configSecret }}
spec:
Expand Down
4 changes: 2 additions & 2 deletions hack/charts/cluster-api-operator/templates/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: {{ $coreNamespace }}
---
Expand All @@ -35,7 +35,7 @@ metadata:
name: {{ $coreName }}
namespace: {{ $coreNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
{{- if or $coreVersion $.Values.configSecret.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: capi-kubeadm-bootstrap-system
Expand All @@ -18,7 +18,7 @@ metadata:
name: kubeadm
namespace: capi-kubeadm-bootstrap-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
{{- with .Values.configSecret }}
Expand All @@ -37,7 +37,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: capi-kubeadm-control-plane-system
Expand All @@ -48,7 +48,7 @@ metadata:
name: kubeadm
namespace: capi-kubeadm-control-plane-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
{{- with .Values.configSecret }}
Expand Down
4 changes: 2 additions & 2 deletions hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: {{ $infrastructureNamespace }}
Expand All @@ -37,7 +37,7 @@ metadata:
name: {{ $infrastructureName }}
namespace: {{ $infrastructureNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }}
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/resources/all-providers-custom-ns-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: helm-custom-ns
Expand All @@ -14,7 +14,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: kubeadm-bootstrap-custom-ns
---
Expand All @@ -23,7 +23,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: kubeadm-control-plane-custom-ns
---
Expand All @@ -32,7 +32,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: capi-custom-ns
---
Expand All @@ -41,7 +41,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: capd-custom-ns
Expand All @@ -53,7 +53,7 @@ metadata:
name: helm
namespace: helm-custom-ns
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand All @@ -66,7 +66,7 @@ metadata:
name: kubeadm
namespace: kubeadm-bootstrap-custom-ns
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
Expand All @@ -81,7 +81,7 @@ metadata:
name: kubeadm
namespace: kubeadm-control-plane-custom-ns
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
Expand All @@ -96,7 +96,7 @@ metadata:
name: cluster-api
namespace: capi-custom-ns
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand All @@ -112,7 +112,7 @@ metadata:
name: docker
namespace: capd-custom-ns
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/resources/all-providers-custom-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: helm-addon-system
Expand All @@ -14,7 +14,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: kubeadm-bootstrap-system
---
Expand All @@ -23,7 +23,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: kubeadm-control-plane-system
---
Expand All @@ -32,7 +32,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
name: capi-system
---
Expand All @@ -41,7 +41,7 @@ apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1"
"argocd.argoproj.io/sync-wave": "1"
name: docker-infrastructure-system
Expand All @@ -53,7 +53,7 @@ metadata:
name: helm
namespace: helm-addon-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand All @@ -66,7 +66,7 @@ metadata:
name: kubeadm
namespace: kubeadm-bootstrap-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
Expand All @@ -81,7 +81,7 @@ metadata:
name: kubeadm
namespace: kubeadm-control-plane-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
Expand All @@ -96,7 +96,7 @@ metadata:
name: cluster-api
namespace: capi-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand All @@ -112,7 +112,7 @@ metadata:
name: docker
namespace: docker-infrastructure-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
Expand Down
Loading

0 comments on commit 67a6085

Please sign in to comment.