Skip to content

Commit

Permalink
Merge pull request #220 from Fedosin/chart_v1alpha2
Browse files Browse the repository at this point in the history
⚠️ Use v1alpha2 manifests in the helm chart
  • Loading branch information
k8s-ci-robot authored Aug 30, 2023
2 parents 9e2684e + 8f00999 commit 0208bda
Show file tree
Hide file tree
Showing 18 changed files with 232 additions and 189 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ metadata:
"helm.sh/hook-weight": "1"
name: capi-system
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: cluster-api
namespace: capi-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if .Values.secretName }}
{{- with .Values.configSecret }}
spec:
secretName: {{ .Values.secretName }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- end }}
configSecret:
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 8 additions & 7 deletions hack/charts/cluster-api-operator/templates/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,26 @@ metadata:
"helm.sh/hook-weight": "1"
name: {{ $bootstrapNamespace }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider
metadata:
name: {{ $bootstrapName }}
namespace: {{ $bootstrapNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if or $bootstrapVersion $.Values.secretName }}
{{- if or $bootstrapVersion $.Values.configSecret.name }}
spec:
{{- end}}
{{- if $bootstrapVersion }}
version: {{ $bootstrapVersion }}
{{- end }}
{{- if $.Values.secretName }}
secretName: {{ $.Values.secretName }}
{{- end }}
{{- if $.Values.secretNamespace }}
secretNamespace: {{ $.Values.secretNamespace }}
{{- if $.Values.configSecret.name }}
configSecret:
name: {{ $.Values.configSecret.name }}
{{- if $.Values.configSecret.namespace }}
namespace: {{ $.Values.configSecret.namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ metadata:
"helm.sh/hook-weight": "1"
name: capi-system
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: cluster-api
namespace: capi-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if .Values.secretName }}
{{- with .Values.configSecret }}
spec:
secretName: {{ .Values.secretName }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- end }}
configSecret:
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 8 additions & 7 deletions hack/charts/cluster-api-operator/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,26 @@ metadata:
"helm.sh/hook-weight": "1"
name: {{ $controlPlaneNamespace }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: ControlPlaneProvider
metadata:
name: {{ $controlPlaneName }}
namespace: {{ $controlPlaneNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if or $controlPlaneVersion $.Values.secretName }}
{{- if or $controlPlaneVersion $.Values.configSecret.name }}
spec:
{{- end}}
{{- if $controlPlaneVersion }}
version: {{ $controlPlaneVersion }}
{{- end }}
{{- if $.Values.secretName }}
secretName: {{ $.Values.secretName }}
{{- end }}
{{- if $.Values.secretNamespace }}
secretNamespace: {{ $.Values.secretNamespace }}
{{- if $.Values.configSecret.name }}
configSecret:
name: {{ $.Values.configSecret.name }}
{{- if $.Values.configSecret.namespace }}
namespace: {{ $.Values.configSecret.namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 8 additions & 7 deletions hack/charts/cluster-api-operator/templates/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,25 @@ metadata:
"helm.sh/hook-weight": "1"
name: {{ $coreNamespace }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: {{ $coreName }}
namespace: {{ $coreNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if or $coreVersion .Values.secretName }}
{{- if or $coreVersion $.Values.configSecret.name }}
spec:
{{- end}}
{{- if $coreVersion }}
version: {{ $coreVersion }}
{{- end }}
{{- if .Values.secretName }}
secretName: {{ .Values.secretName }}
{{- end }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- if $.Values.configSecret.name }}
configSecret:
name: {{ $.Values.configSecret.name }}
{{- if $.Values.configSecret.namespace }}
namespace: {{ $.Values.configSecret.namespace }}
{{- end }}
{{- end }}
{{- end }}
43 changes: 25 additions & 18 deletions hack/charts/cluster-api-operator/templates/infra-conditions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.infrastructure }}

# Deploy core, bootstrap, and infrastructure components if not specified
{{- if not .Values.core }}
---
Expand All @@ -10,22 +11,24 @@ metadata:
"helm.sh/hook-weight": "1"
name: capi-system
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: cluster-api
namespace: capi-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if .Values.secretName }}
{{- with .Values.configSecret }}
spec:
secretName: {{ .Values.secretName }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- end }}
configSecret:
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}

{{- if not .Values.bootstrap }}
---
apiVersion: v1
Expand All @@ -36,22 +39,24 @@ metadata:
"helm.sh/hook-weight": "1"
name: capi-kubeadm-bootstrap-system
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider
metadata:
name: kubeadm
namespace: capi-kubeadm-bootstrap-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if .Values.secretName }}
{{- with .Values.configSecret }}
spec:
secretName: {{ .Values.secretName }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- end }}
configSecret:
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}

{{- if not .Values.controlPlane }}
---
apiVersion: v1
Expand All @@ -62,20 +67,22 @@ metadata:
"helm.sh/hook-weight": "1"
name: capi-kubeadm-control-plane-system
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: ControlPlaneProvider
metadata:
name: kubeadm
namespace: capi-kubeadm-control-plane-system
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if .Values.secretName }}
{{- with .Values.configSecret }}
spec:
secretName: {{ .Values.secretName }}
{{- if .Values.secretNamespace }}
secretNamespace: {{ .Values.secretNamespace }}
{{- end }}
configSecret:
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}

{{- end }}
15 changes: 8 additions & 7 deletions hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,26 @@ metadata:
"helm.sh/hook-weight": "1"
name: {{ $infrastructureNamespace }}
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
name: {{ $infrastructureName }}
namespace: {{ $infrastructureNamespace }}
annotations:
"helm.sh/hook": "post-install"
"helm.sh/hook-weight": "2"
{{- if or $infrastructureVersion $.Values.secretName }}
{{- if or $infrastructureVersion $.Values.configSecret.name }}
spec:
{{- end }}
{{- if $infrastructureVersion }}
version: {{ $infrastructureVersion }}
{{- end }}
{{- if $.Values.secretName }}
secretName: {{ $.Values.secretName }}
{{- end }}
{{- if $.Values.secretNamespace }}
secretNamespace: {{ $.Values.secretNamespace }}
{{- if $.Values.configSecret.name }}
configSecret:
name: {{ $.Values.configSecret.name }}
{{- if $.Values.configSecret.namespace }}
namespace: {{ $.Values.configSecret.namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 1 addition & 2 deletions hack/charts/cluster-api-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ controlPlane: ""
infrastructure: ""
# ---
# Common configuration secret options
secretName: ""
secretNamespace: ""
configSecret: {}
# ---
# CAPI operator deployment options
logLevel: 2
Expand Down
Loading

0 comments on commit 0208bda

Please sign in to comment.