WIP Setup ArgoCD
This commit is contained in:
@@ -1,2 +1,58 @@
|
||||
---
|
||||
#tasks to deploy argoCD to cluster
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/argo-cd/values.yaml
|
||||
|
||||
- name: Create a namespace for argoCD
|
||||
k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
name: "{{apps.argocd.namespace}}"
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
state: "{{apps.argocd.state}}"
|
||||
become: true
|
||||
|
||||
#- name: create persistent volume resources
|
||||
# kubernetes.core.k8s:
|
||||
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
# state: "{{apps.gitea.state}}"
|
||||
# definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
# loop:
|
||||
# - gitea/pv.yaml
|
||||
# - gitea/pv-claim.yaml
|
||||
# become: true
|
||||
|
||||
- name: Install argocd
|
||||
block:
|
||||
- name: Add argocd chart helm repo
|
||||
local_action:
|
||||
module: kubernetes.core.helm_repository
|
||||
name: bitnami
|
||||
repo_url: https://charts.bitnami.com/bitnami
|
||||
|
||||
- name: load variables files/argocd/values.yaml
|
||||
ansible.builtin.include_vars:
|
||||
file: files/argocd/values.yaml
|
||||
name: release_values
|
||||
|
||||
- name: Install argocd Release
|
||||
local_action:
|
||||
module: kubernetes.core.helm
|
||||
release_state: "{{apps.argocd.state}}"
|
||||
name: argo-cd
|
||||
namespace: "{{apps.argocd.namespace}}"
|
||||
create_namespace: yes
|
||||
update_repo_cache: True
|
||||
chart_ref: bitnami/argo-cd
|
||||
values: "{{release_values}}"
|
||||
|
||||
wait: true
|
||||
|
||||
- name: create extra resources for argoCD
|
||||
kubernetes.core.k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
state: "{{apps.argocd.state}}"
|
||||
definition: "{{ lookup('file', item) | from_yaml }}"
|
||||
loop:
|
||||
- argocd/ingress.yaml
|
||||
become: true
|
||||
|
||||
|
||||
@@ -54,97 +54,7 @@
|
||||
- name: deploy backstage
|
||||
include_tasks: deployments/backstage.yaml
|
||||
when: apps.backstage.enabled
|
||||
#-----------------------------------------------------
|
||||
#- include_tasks: mariadb.yaml
|
||||
#
|
||||
# https://artifacthub.io/packages/helm/twuni/docker-registry
|
||||
#- name: Deploy latest version of docker-registry in dev-tools namespace
|
||||
# local_action:
|
||||
# module: kubernetes.core.helm
|
||||
# name: dkregistry
|
||||
# chart_ref: twuni/docker-registry
|
||||
# release_namespace: dev-tools
|
||||
# create_namespace: True
|
||||
# values:
|
||||
# replicaCount: 1
|
||||
# ingress:
|
||||
# enabled: true
|
||||
# hosts:
|
||||
# - dkregistry.xai-corp.net
|
||||
# className: traefik
|
||||
# secrets.htpassword: me1
|
||||
# extraVolumeMounts:
|
||||
# - name: registry-data
|
||||
# mountPath: /var/lib/registry-data
|
||||
# - name: registry-auth
|
||||
# mountPath: /auth
|
||||
# - name: registry-auth
|
||||
# mountPath: /etc/docker/registry/
|
||||
# - name: letsencrypt-data
|
||||
# mountPath: /certs
|
||||
# - name: letsencrypt-config
|
||||
# mountPath: /etc/letsencrypt
|
||||
# extraVolumes:
|
||||
# - name: registry-data
|
||||
# hostPath:
|
||||
# path: /opt/shared/dkregistry/data
|
||||
# - name: registry-auth
|
||||
# hostPath:
|
||||
# path: /opt/shared/dkregistry/auth
|
||||
# - name: registry-config
|
||||
# hostPath:
|
||||
# path: /opt/shared/dkregistry/config/
|
||||
# - name: letsencrypt-data
|
||||
# hostPath:
|
||||
# path: /opt/shared/letsencrypt-2
|
||||
# - name: letsencrypt-config
|
||||
# hostPath:
|
||||
# path: /opt/shared/letsencrypt-2
|
||||
# extraEnvVars:
|
||||
# - name: REGISTRY_HTTP_SECRET
|
||||
# value: aabuioqlwlcpp2
|
||||
# - name: REGISTRY_HTTP_TLS_CERTIFICATE
|
||||
# value: /certs/live/xai-corp.net/fullchain.pem
|
||||
# - name: REGISTRY_HTTP_TLS_KEY
|
||||
# value: /certs/live/xai-corp.net/privkey.pem
|
||||
#
|
||||
#
|
||||
# k3s config file
|
||||
#- name: Copy k3s config file to /etc/rancher/k3s/config.yaml
|
||||
# ansible.builtin.copy:
|
||||
# src: config.yaml
|
||||
# dest: /etc/rancher/k3s/config.yaml
|
||||
# become: true
|
||||
#
|
||||
# provision gitea
|
||||
#
|
||||
# provision argoCD
|
||||
#
|
||||
# provision graphana
|
||||
#- name: Copy manifest for graphana
|
||||
# ansible.builtin.copy:
|
||||
# src: manifests/graphana.helm.yaml
|
||||
# dest: /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
||||
# become: true
|
||||
#
|
||||
#- name: Copy manifest for docker registry
|
||||
# ansible.builtin.copy:
|
||||
# src: manifests/registry.helm.yaml
|
||||
# dest: /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
||||
# become: true
|
||||
#
|
||||
#- name: Copy manifest for mariadb
|
||||
# ansible.builtin.copy:
|
||||
# src: manifests/mariadb.helm.yaml
|
||||
# dest: /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
||||
# become: true
|
||||
#
|
||||
#- name: remove manifests
|
||||
# ansible.builtin.file:
|
||||
# state: absent
|
||||
# path: "{{ item }}"
|
||||
# loop:
|
||||
# - /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
||||
# - /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
||||
# - /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
||||
# become: true
|
||||
|
||||
- name: deploy argoCD
|
||||
include_tasks: deployments/argoCD.yaml
|
||||
when: apps.argocd.enabled
|
||||
|
||||
Reference in New Issue
Block a user