Skip to content

Commit

Permalink
chore(certs): add labels
Browse files Browse the repository at this point in the history
This patch set adds in the manifests guards and labels for the
cert-manager Issuer.

Change-Id: Ibcb45f9617be2b2ebde6d2b2695bfa6b358b2079
Signed-off-by: Tin Lam <[email protected]>
  • Loading branch information
stannum-l committed Jul 10, 2020
1 parent 197409b commit c562986
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ca-issuer/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
# limitations under the License.

---
dependencies: []
dependencies:
- name: helm-toolkit
repository: https://localhost:8879/charts
version: 0.1.0
...
5 changes: 5 additions & 0 deletions ca-issuer/templates/issuer-ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{- if .Values.manifests.issuer }}
{{- $envAll := . }}
---
apiVersion: cert-manager.io/v1alpha3
kind: Issuer
metadata:
name: {{ .Values.conf.ca.issuer.name }}
namespace: {{ .Release.Namespace }}
labels:
{{ tuple $envAll "cert-manager" "issuer" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:
ca:
secretName: {{ .Values.conf.ca.secret.name }}
...
{{- end }}
2 changes: 2 additions & 0 deletions ca-issuer/templates/secret-ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{- if .Values.manifests.secret_ca }}
---
apiVersion: v1
kind: Secret
Expand All @@ -22,3 +23,4 @@ data:
tls.crt: {{ .Values.conf.ca.secret.crt | default "" | b64enc }}
tls.key: {{ .Values.conf.ca.secret.key | default "" | b64enc }}
...
{{- end }}
4 changes: 4 additions & 0 deletions ca-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ conf:
name: secret-name
crt: null
key: null

manifests:
issuer: true
secret_ca: true
...

0 comments on commit c562986

Please sign in to comment.