Skip to content

Commit

Permalink
Merge pull request #458 from richardcase/upgrade_changes
Browse files Browse the repository at this point in the history
fix: chart changes for upgrade and uninstall
  • Loading branch information
alexander-demicev authored Apr 2, 2024
2 parents ca52076 + 4dc2c0b commit d5083b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions charts/rancher-turtles/templates/core-provider.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{{- if index .Values "cluster-api-operator" "cluster-api" "enabled" }}
{{- $namespace := index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
{{- if not (lookup "v1" "Namespace" "" $namespace) }}
---
apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/hook": "post-install, post-upgrade"
"helm.sh/hook": "post-install, post-upgrade, pre-delete"
"helm.sh/hook-weight": "1"
name: {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
{{- end }}
---
apiVersion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
name: cluster-api
namespace: {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
annotations:
"helm.sh/hook": "post-install, post-upgrade"
"helm.sh/hook": "post-install, post-upgrade, pre-delete"
"helm.sh/hook-weight": "2"
spec:
name: cluster-api
Expand Down Expand Up @@ -45,7 +48,7 @@ metadata:
name: capi-additional-rbac-roles
namespace: {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
annotations:
"helm.sh/hook": "post-install, post-upgrade"
"helm.sh/hook": "post-install, post-upgrade, pre-delete"
"helm.sh/hook-weight": "2"
data:
manifests: |-
Expand Down

0 comments on commit d5083b1

Please sign in to comment.