Skip to content

Commit

Permalink
add deps for cluster api (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz authored Apr 14, 2023
1 parent 9bc9599 commit 0d845b2
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
12 changes: 12 additions & 0 deletions bootstrap/helm/bootstrap-operator/deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: plural.sh/v1alpha1
kind: Dependencies
metadata:
application: true
description: installs the needed dependencies for cluster setup
spec:
dependencies:
- type: terraform
name: aws-bootstrap-cluster-api
repo: bootstrap
version: '>= 0.1.0'
optional: true
7 changes: 0 additions & 7 deletions bootstrap/helm/bootstrap-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ app.kubernetes.io/name: {{ include "bootstrap-operator.name" . }}-controller
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "bootstrap-operator.proxySelectorLabels" -}}
app.kubernetes.io/name: {{ include "bootstrap-operator.name" . }}-proxy
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/helm/bootstrap-operator/templates/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
managerImage: registry.k8s.io/capi-operator/cluster-api-operator:v0.1.0
kubeRBACProxyImage: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
cloudSpec:
{{ if .Values.operator.secret }}
{{ if .Values.operator.cloud }}
{{ toYaml .Values.operator.cloud | nindent 4 }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "bootstrap-operator.serviceAccountName" . }}-controller
labels:
{{- include "boostrap-operator.labels" . | nindent 4 }}
{{- include "bootstrap-operator.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/helm/bootstrap-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ affinity: {}
operator:
clusterName: ""
secret: {}
cloud: {}
cloud: {}
4 changes: 3 additions & 1 deletion bootstrap/helm/bootstrap-operator/values.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
operator:
clusterName: {{ .Cluster }}
secret:
secret: {}
cloud: {}
{{ if eq .Provider "aws" }}
secret:
AWS_ACCESS_KEY_ID: {{ .Context.AccessKey | b64enc | quote }}
AWS_SECRET_ACCESS_KEY: {{ .Context.SecretAccessKey | b64enc | quote }}
AWS_SESSION_TOKEN: {{ .Context.SessionToken | b64enc | quote }}
Expand Down
11 changes: 11 additions & 0 deletions bootstrap/terraform/aws-bootstrap-cluster-api/deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: plural.sh/v1alpha1
kind: Dependencies
metadata:
description: Creates an EKS cluster and prepares it for bootstrapping
version: 0.1.0
spec:
breaking: true
dependencies: []
providers:
- aws

0 comments on commit 0d845b2

Please sign in to comment.