blob: ee73205811b60010e602ff17c09a719f53a5b8ed [file] [log] [blame]
Mohammed Naserb7b97d62022-03-12 16:30:00 -05001# Copyright (c) 2022 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15- name: Deploy Helm chart
16 kubernetes.core.helm:
17 name: cert-manager
18 chart_ref: jetstack/cert-manager
19 chart_version: v1.7.1
20 release_namespace: cert-manager
21 create_namespace: true
22 kubeconfig: /etc/kubernetes/admin.conf
23 values:
24 installCRDs: true
25 volumes:
26 - name: etc-ssl-certs
27 hostPath:
28 path: /etc/ssl/certs
29 volumeMounts:
30 - name: etc-ssl-certs
31 mountPath: /etc/ssl/certs
32 readOnly: true
33
34- name: Create issuer
35 kubernetes.core.k8s:
36 state: present
37 definition:
38 apiVersion: cert-manager.io/v1
39 kind: Issuer
40 metadata:
41 name: openstack
42 namespace: openstack
43 spec: "{{ cert_manager_issuer }}"
okozachenko05a72ed2022-04-12 23:01:43 +100044
45- name: Create self-signed issuer
46 kubernetes.core.k8s:
47 state: present
48 definition:
49 apiVersion: cert-manager.io/v1
50 kind: ClusterIssuer
51 metadata:
52 name: selfsigned-issuer
53 spec:
54 selfSigned: {}
55
56- name: Bootstrap a custom root certificate for a private PKI
57 kubernetes.core.k8s:
58 state: present
59 definition:
60 apiVersion: cert-manager.io/v1
61 kind: Certificate
62 metadata:
63 name: selfsigned-ca
64 namespace: openstack
65 spec:
66 isCA: true
67 commonName: selfsigned-ca
68 secretName: root-secret
69 duration: 86400h # 3600d
70 renewBefore: 360h # 15d
71 privateKey:
72 algorithm: ECDSA
73 size: 256
74 issuerRef:
75 name: selfsigned-issuer
76 kind: ClusterIssuer
77 group: cert-manager.io