-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from denis-ryzhkov/multiple-sveltos-profiles
Generate multiple sveltos `ClusterProfile`-s to distribute `external-dns-aws-credentials` to "storage" cluster only
- Loading branch information
Showing
6 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
charts/kof-mothership/templates/kcm/sveltos/copy-template.yaml
This file was deleted.
Oops, something went wrong.
31 changes: 23 additions & 8 deletions
31
charts/kof-mothership/templates/sveltos/copy-secrets-cluster-profile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
{{- if .Values.kcm.kof.secrets_copy.secrets }} | ||
{{- range $name, $value := .Values.kcm.kof.clusterProfiles }} | ||
{{- /* Distributing secrets to clusters automatically*/}} | ||
--- | ||
apiVersion: config.projectsveltos.io/v1beta1 | ||
kind: ClusterProfile | ||
metadata: | ||
name: kof-secrets | ||
name: {{ $name }} | ||
spec: | ||
clusterSelector: | ||
matchLabels: {{ .Values.kcm.kof.secrets_copy.matchLabels | toYaml | nindent 6 }} | ||
matchLabels: {{ $value.matchLabels | toYaml | nindent 6 }} | ||
templateResourceRefs: | ||
{{- range .Values.kcm.kof.secrets_copy.secrets }} | ||
- resource: | ||
{{- range $value.secrets }} | ||
- identifier: secret-{{ . }} | ||
resource: | ||
apiVersion: v1 | ||
kind: Secret | ||
name: {{ . }} | ||
namespace: {{ $.Release.Namespace }} | ||
identifier: Resource | ||
{{- end }} | ||
{{- end }} | ||
policyRefs: | ||
{{- range $value.secrets }} | ||
- kind: ConfigMap | ||
name: copy-resource-template | ||
name: secret-template-{{ . }} | ||
namespace: {{ $.Release.Namespace }} | ||
{{- end }} | ||
{{- range $value.secrets }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: secret-template-{{ . }} | ||
namespace: {{ $.Release.Namespace }} | ||
annotations: | ||
projectsveltos.io/template: "true" | ||
data: | ||
secret.yaml: | | ||
{{` {{ copy "`}}secret-{{ . }}{{`" }} `}} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters