feat(cert-manager): Add Cloudns issuer and DNS-01 challenge support
- Introduced a new Cloudns issuer configuration for cert-manager. - Created separate tasks for DNS-01 and HTTP-01 challenge issuers. - Updated cert-manager tasks to include Cloudns provider and manage secrets. - Refactored existing LetsEncrypt issuer registration to use new task structure. - Added necessary Kubernetes resources for Cloudns integration, including RBAC and certificates. - Updated Terraform configurations to support new DNS records and service changes. - Adjusted deployment strategies for CoreDNS and Open WebUI applications.
This commit is contained in:
@@ -15,64 +15,10 @@
|
||||
src: "{{ k8s_etc }}/k8s-certmanager.yaml"
|
||||
wait: true
|
||||
|
||||
- name: CertManager | Register LetsEncrypt (prod)
|
||||
when: microk8s_lets_encrypt_issuer is true
|
||||
environment:
|
||||
PATH: "{{ k8s_venv }}/bin:{{ ansible_env.PATH }}"
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ k8s_venv }}/bin/python"
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
kubeconfig: "{{ k8s_kubeconfig }}"
|
||||
wait: true
|
||||
definition:
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-prod
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
acme:
|
||||
# The ACME server URL
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
# Email address used for ACME registration
|
||||
email: "{{ microk8s_issuer_email }}"
|
||||
# Name of a secret used to store the ACME account private key
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-prod
|
||||
# Enable the HTTP-01 challenge provider
|
||||
solvers:
|
||||
- http01:
|
||||
ingress:
|
||||
class: public
|
||||
- name: CertManager | LetsEncrypt DNS-01 issuer
|
||||
ansible.builtin.include_tasks: issuers/dns-01.yml
|
||||
when: microk8s_certmgr_letsencrypt_dns01 is true
|
||||
|
||||
- name: CertManager | Register LetsEncrypt (staging)
|
||||
when: microk8s_lets_encrypt_issuer is true
|
||||
environment:
|
||||
PATH: "{{ k8s_venv }}/bin:{{ ansible_env.PATH }}"
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ k8s_venv }}/bin/python"
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
kubeconfig: "{{ k8s_kubeconfig }}"
|
||||
wait: true
|
||||
definition:
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-staging
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
acme:
|
||||
# The ACME server URL
|
||||
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
# Email address used for ACME registration
|
||||
email: "{{ microk8s_issuer_email }}"
|
||||
# Name of a secret used to store the ACME account private key
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-staging
|
||||
# Enable the HTTP-01 challenge provider
|
||||
solvers:
|
||||
- http01:
|
||||
ingress:
|
||||
class: public
|
||||
- name: CertManager | LetsEncrypt HTTP-01 issuer
|
||||
ansible.builtin.include_tasks: issuers/http-01.yml
|
||||
when: microk8s_certmgr_letsencrypt_http01 is true
|
||||
|
||||
Reference in New Issue
Block a user