Browse Source

Adds Helm docs for dockerconfigjson template (#1307)

cebidhem 3 years ago
parent
commit
284ea9e0f8

+ 10 - 2
docs/guides-common-k8s-secret-types.md

@@ -19,6 +19,14 @@ Then create a ExternalSecret resource taking advantage of templating to populate
 {% include 'gcpsm-docker-config-externalsecret.yaml' %}
 {% include 'gcpsm-docker-config-externalsecret.yaml' %}
 ```
 ```
 
 
+For Helm users: since Helm interprets the template above, the ExternalSecret resource can be written this way:
+
+```yaml
+{% include 'gcpsm-docker-config-helm-externalsecret.yaml' %}
+```
+
+For more information, please see [this issue](https://github.com/helm/helm/issues/2798)
+
 This will generate a valid dockerconfigjson secret for you to use!
 This will generate a valid dockerconfigjson secret for you to use!
 
 
 You can get the final value with:
 You can get the final value with:
@@ -73,5 +81,5 @@ kubectl get secret secret-to-be-created -n <namespace> | -o jsonpath="{.data.ssh
 
 
 ## More examples
 ## More examples
 
 
-!!! note "We need more examples here" 
-    Feel free to contribute with our docs and add more examples here!
+!!! note "We need more examples here"
+    Feel free to contribute with our docs and add more examples here!

+ 23 - 0
docs/snippets/gcpsm-docker-config-helm-externalsecret.yaml

@@ -0,0 +1,23 @@
+{% raw %}
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  name: dk-cfg-example
+spec:
+  refreshInterval: 1h
+  secretStoreRef:
+    name: example
+    kind: SecretStore
+  target:
+    template:
+      type: kubernetes.io/dockerconfigjson
+      engineVersion: v2
+      data:
+        .dockerconfigjson: "{{ `{{ .mysecret }}` }}"
+    name: secret-to-be-created
+    creationPolicy: Owner
+  data:
+  - secretKey: mysecret
+    remoteRef:
+      key: docker-config-example
+{% endraw %}