Install SealedSecrets;Store hypervisor credentials in secret
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6c4fe7a0e6
commit
1141225907
@ -36,8 +36,7 @@
|
|||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
namespace: "{{ item.namespace }}"
|
namespace: "{{ item.namespace }}"
|
||||||
labels: "{{ item.labels | default({}) | indent(width=4, indent=True) }}"
|
labels: "{{ item.labels | default({}) | indent(width=4, indent=True) }}"
|
||||||
key: "{{ item.key }}"
|
data: "{{ item.data }}"
|
||||||
value: "{{ item.value }}"
|
|
||||||
loop:
|
loop:
|
||||||
- name: argocd-tls-certs-cm
|
- name: argocd-tls-certs-cm
|
||||||
namespace: argo-cd
|
namespace: argo-cd
|
||||||
@ -45,13 +44,15 @@
|
|||||||
labels: |
|
labels: |
|
||||||
app.kubernetes.io/name: argocd-cm
|
app.kubernetes.io/name: argocd-cm
|
||||||
app.kubernetes.io/part-of: argocd
|
app.kubernetes.io/part-of: argocd
|
||||||
key: git.{{ vapp['metacluster.fqdn'] }}
|
data:
|
||||||
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
|
- key: git.{{ vapp['metacluster.fqdn'] }}
|
||||||
|
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
|
||||||
- name: step-certificates-certs
|
- name: step-certificates-certs
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
kind: secret
|
kind: secret
|
||||||
key: root_ca.crt
|
data:
|
||||||
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] | b64encode }}"
|
- key: root_ca.crt
|
||||||
|
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] | b64encode }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.kind + '/' + item.name + ' (' + item.namespace + ')' }}"
|
label: "{{ item.kind + '/' + item.name + ' (' + item.namespace + ')' }}"
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
- import_tasks: storage.yml
|
- import_tasks: storage.yml
|
||||||
- import_tasks: certauthority.yml
|
- import_tasks: certauthority.yml
|
||||||
- import_tasks: registry.yml
|
- import_tasks: registry.yml
|
||||||
|
- import_tasks: secrets.yml
|
||||||
- import_tasks: git.yml
|
- import_tasks: git.yml
|
||||||
- import_tasks: gitops.yml
|
- import_tasks: gitops.yml
|
||||||
|
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
- name: Install sealed-secrets chart
|
||||||
|
kubernetes.core.helm:
|
||||||
|
name: sealed-secrets-controller
|
||||||
|
chart_ref: /opt/metacluster/helm-charts/sealed-secrets
|
||||||
|
release_namespace: kube-system
|
||||||
|
wait: yes
|
||||||
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
|
values: "{{ components.sealedsecrets.chart_values }}"
|
||||||
|
|
||||||
|
- name: Store hypervisor details in secret
|
||||||
|
kubernetes.core.k8s:
|
||||||
|
state: present
|
||||||
|
template: secret.j2
|
||||||
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
|
vars:
|
||||||
|
_template:
|
||||||
|
name: hypervisor-credentials
|
||||||
|
namespace: kube-system
|
||||||
|
data:
|
||||||
|
- key: HV_FQDN
|
||||||
|
value: "{{ vapp['hv.fqdn'] | b64encode }}"
|
||||||
|
- key: HV_USERNAME
|
||||||
|
value: "{{ vapp['hv.username'] | b64encode }}"
|
||||||
|
- key: HV_PASSWORD
|
||||||
|
value: "{{ vapp['hv.password'] | b64encode }}"
|
@ -6,4 +6,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{ _template.labels }}
|
{{ _template.labels }}
|
||||||
data:
|
data:
|
||||||
"{{ _template.key }}": {{ _template.value }}
|
{% for kv_pair in _template.data %}
|
||||||
|
"{{ kv_pair.key }}": {{ kv_pair.value }}
|
||||||
|
{% endfor %}
|
||||||
|
@ -4,4 +4,6 @@ metadata:
|
|||||||
name: {{ _template.name }}
|
name: {{ _template.name }}
|
||||||
namespace: {{ _template.namespace }}
|
namespace: {{ _template.namespace }}
|
||||||
data:
|
data:
|
||||||
"{{ _template.key }}": {{ _template.value }}
|
{% for kv_pair in _template.data %}
|
||||||
|
"{{ kv_pair.key }}": {{ kv_pair.value }}
|
||||||
|
{% endfor %}
|
||||||
|
@ -150,26 +150,6 @@ components:
|
|||||||
configs:
|
configs:
|
||||||
secret:
|
secret:
|
||||||
argocdServerAdminPassword: "{{ vapp['guestinfo.rootpw'] | password_hash('bcrypt') }}"
|
argocdServerAdminPassword: "{{ vapp['guestinfo.rootpw'] | password_hash('bcrypt') }}"
|
||||||
# controller:
|
|
||||||
# volumeMounts:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# mountPath: /etc/ssl/certs/custom-ca-certificates.crt
|
|
||||||
# subPath: custom-ca-certificates.crt
|
|
||||||
# volumes:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# secret:
|
|
||||||
# defaultMode: 420
|
|
||||||
# secretName: step-certificates-certs
|
|
||||||
# repoServer:
|
|
||||||
# volumeMounts:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# mountPath: /etc/ssl/certs/custom-ca-certificates.crt
|
|
||||||
# subPath: custom-ca-certificates.crt
|
|
||||||
# volumes:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# secret:
|
|
||||||
# defaultMode: 420
|
|
||||||
# secretName: step-certificates-certs
|
|
||||||
server:
|
server:
|
||||||
extraArgs:
|
extraArgs:
|
||||||
- --insecure
|
- --insecure
|
||||||
@ -177,15 +157,6 @@ components:
|
|||||||
enabled: true
|
enabled: true
|
||||||
hosts:
|
hosts:
|
||||||
- gitops.{{ vapp['metacluster.fqdn'] }}
|
- gitops.{{ vapp['metacluster.fqdn'] }}
|
||||||
# volumeMounts:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# mountPath: /etc/ssl/certs/custom-ca-certificates.crt
|
|
||||||
# subPath: custom-ca-certificates.crt
|
|
||||||
# volumes:
|
|
||||||
# - name: custom-ca-certificates
|
|
||||||
# secret:
|
|
||||||
# defaultMode: 420
|
|
||||||
# secretName: step-certificates-certs
|
|
||||||
|
|
||||||
sealed-secrets:
|
sealed-secrets:
|
||||||
helm:
|
helm:
|
||||||
@ -214,6 +185,9 @@ dependencies:
|
|||||||
url: https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz
|
url: https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz
|
||||||
archive: compressed
|
archive: compressed
|
||||||
extra_opts: --strip-components=1
|
extra_opts: --strip-components=1
|
||||||
|
- filename: kubeseal
|
||||||
|
url: https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.18.2/kubeseal-0.18.2-linux-amd64.tar.gz
|
||||||
|
archive: compressed
|
||||||
- filename: skopeo
|
- filename: skopeo
|
||||||
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/skopeo/v1.9.1/skopeo
|
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/skopeo/v1.9.1/skopeo
|
||||||
- filename: step
|
- filename: step
|
||||||
|
Loading…
Reference in New Issue
Block a user