diff --git a/charts/argo-cd/Chart.lock b/charts/argo-cd/Chart.lock new file mode 100644 index 00000000..1d0c4a58 --- /dev/null +++ b/charts/argo-cd/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: common + repository: https://sourcemation.github.io/charts/ + version: 0.1.1 +- name: argo-cd + repository: https://argoproj.github.io/argo-helm + version: 7.6.8 +digest: sha256:2714abb2c768d0b7c3bd65ed0f1903b0cfdb27f004a679bf9f4b75a73b935e85 +generated: "2024-10-29T12:00:13.610549094+01:00" diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml new file mode 100644 index 00000000..c29292ae --- /dev/null +++ b/charts/argo-cd/Chart.yaml @@ -0,0 +1,27 @@ +apiVersion: v2 +appVersion: 2.8.3 +version: 1.0.0 +name: argo-cd +description: "Argo CD is a declarative, GitOps-based continuous delivery tool for Kubernetes, allowing users to manage application deployments." +type: application +annotations: + catalog.cattle.io/display-name: Argo CD + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux + catalog.cattle.io/release-name: argo-cd +home: https://linuxpolska.com +icon: https://linuxpolska.com/logo/LinuxPolska-icon.png +keywords: + - gitops + - ci/cd + - kubernetes +sources: + - https://github.com/argoproj/argo-helm +dependencies: + - name: common + repository: https://sourcemation.github.io/charts/ + version: 0.1.1 + - name: argo-cd + repository: https://argoproj.github.io/argo-helm + version: 7.6.8 +kubeVersion: '>=1.26.0-0 <1.31.0-0' diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md new file mode 100644 index 00000000..6284bb68 --- /dev/null +++ b/charts/argo-cd/README.md @@ -0,0 +1,79 @@ +## General + +### Are you looking for more information? + +1. Documentation: https://argo-cd.readthedocs.io +2. Chart Source: https://github.com/argoproj/argo-helm + +## Before Installation + +The installation of cert-manager is required according to the instructions +provided in the README file of the latest version: +https://github.com/SourceMation/charts/tree/main/charts/cert-manager + +## After Installation + +> **Note:** +> no action required + +## Before Upgrade + +> **Note:** +> no action required + +## After Upgrade + +> **Note:** +> no action required + +## Tips and Tricks + +> **Note:** +> no tips and tricks + +## Known Issues + +> **Note:** +> Notify us: https://github.com/SourceMation/charts/issues + +## CLI installation + +### Preparation + +```bash + +export CHART_NAMESPACE=argo-cd-namespace +export CHART_URL=argo-cd.apps.example.com + +kubectl create ns ${CHART_NAMESPACE} +kubectl config set-context --current --namespace ${CHART_NAMESPACE} + +``` + +### Go go helm + +``` bash + + +cd charts/charts/argo-cd/ +helm upgrade --install argo-cd -n ${CHART_NAMESPACE} --set argo-cd.global.domain=${CHART_URL} . + +``` + +### Validation and Testing + +```bash + +kubectl -n ${CHART_NAMESPACE} get po + +``` + +## CLI removing + +```bash + +helm -n ${CHART_NAMESPACE} uninstall argo-cd + + +``` + diff --git a/charts/argo-cd/app-readme.md b/charts/argo-cd/app-readme.md new file mode 100644 index 00000000..b5955d89 --- /dev/null +++ b/charts/argo-cd/app-readme.md @@ -0,0 +1,4 @@ +## Overview + +Argo CD automates the synchronization and monitoring of applications, ensuring they are always in the desired state defined in version control. + diff --git a/charts/argo-cd/charts/argo-cd-7.6.8.tgz b/charts/argo-cd/charts/argo-cd-7.6.8.tgz new file mode 100644 index 00000000..3c8dcfe5 Binary files /dev/null and b/charts/argo-cd/charts/argo-cd-7.6.8.tgz differ diff --git a/charts/argo-cd/charts/common-0.1.1.tgz b/charts/argo-cd/charts/common-0.1.1.tgz new file mode 100644 index 00000000..26c0a966 Binary files /dev/null and b/charts/argo-cd/charts/common-0.1.1.tgz differ diff --git a/charts/argo-cd/questions.yaml b/charts/argo-cd/questions.yaml new file mode 100644 index 00000000..b2920e02 --- /dev/null +++ b/charts/argo-cd/questions.yaml @@ -0,0 +1,178 @@ +categories: +- cicd +namespace: argo-cd-namespace + +questions: +- variable: argo-cd.configs.secret.argocdServerAdminPassword + label: Argo CD admin (bcrypt) password - check ./scripts directory + description: "Default password is 'P@ssword1'. Change it!" + group: "Workloads" + type: password + required: true +- variable: questionsSpec.argocdApp.customImage + default: false + label: Change Argo CD image + group: "Workloads" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.image.repository + default: "argo-cd/argo-cd" + label: Argo CD image repository + description: "Argo CD image repository" + group: "Workloads" + type: string + - variable: argo-cd.image.tag + default: "" + label: Argo CD image tag + description: "Argo CD image tag" + group: "Workloads" + type: string + required: false + - variable: argo-cd.image.imagePullPolicy + default: "IfNotPresent" + label: Argo CD image pullPolicy + description: "Argo CD image pullPolicy" + group: "Workloads" + type: enum + options: + - "Always" + - "IfNotPresent" + - "Never" +- variable: questionsSpec.argocdApp.customResources + default: false + label: Modify Argo CD resource consumption + group: "Workloads" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.controller.resources.limits.cpu + label: Milicore limit for a Argo CD instance + description: "1000m(milicores) = 1vCPU" + group: "Workloads" + type: string + required: false + - variable: argo-cd.controller.resources.requests.cpu + label: Milicore requests for a Argo CD instance + description: "1000m(milicores) = 1vCPU, value must be <= milicore limit" + group: "Workloads" + type: string + required: false + - variable: argo-cd.controller.resources.limits.memory + label: Memory limit for a Argo CD instance + description: "Memory limit for a Argo CD instance" + group: "Workloads" + type: string + required: false + - variable: argo-cd.controller.resources.requests.memory + label: Memory requests for a Argo CD instance + description: "Memory request, value must be <= memory limit" + group: "Workloads" + type: string + required: false +- variable: argo-cd.global.deploymentStrategy.type + default: "RollingUpdate" + label: Argo CD deployment strategy + description: "Argo CD deployment strategy" + group: "Workloads" + type: enum + options: + - "RollingUpdate" + - "Recreate" + required: false +- variable: questionsSpec.dexApp.customImage + default: false + label: Change Dex image + group: "Workloads" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.dex.image.repository + default: "dex/dex" + label: Dex image repository + description: "Dex image repository" + group: "Workloads" + type: string + - variable: argo-cd.dex.image.tag + default: "" + label: Dex image tag + description: "Dex image tag" + group: "Workloads" + type: string + required: false + - variable: argo-cd.dex.image.imagePullPolicy + default: "IfNotPresent" + label: Dex image pullPolicy + description: "Dex image pullPolicy" + group: "Workloads" + type: enum + options: + - "Always" + - "IfNotPresent" + - "Never" +- variable: questionsSpec.redisApp.customImage + default: false + label: Change Redis image + group: "Workloads" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.redis.image.repository + default: "redis/redis" + label: Redis image repository + description: "Redis image repository" + group: "Workloads" + type: string + - variable: argo-cd.redis.image.tag + default: "" + label: Redis image tag + description: "Redis image tag" + group: "Workloads" + type: string + required: false + - variable: argo-cd.redis.image.imagePullPolicy + default: "IfNotPresent" + label: Redis image pullPolicy + description: "Redis image pullPolicy" + group: "Workloads" + type: enum + options: + - "Always" + - "IfNotPresent" + - "Never" + +- variable: argo-cd.server.ingress.enabled + label: Enable Argo CD ingress + group: "Service Discovery" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.global.domain + default: "argo-cd.apps.example.com" + label: URL + description: "Argo CD Ingress URL" + group: "Service Discovery" + type: hostname + required: false + +- variable: argo-cd.dex.enabled + label: Enable Dex server + group: "Integrations" + type: boolean +- variable: argo-cd.redis.enabled + label: Enable Redis server + group: "Integrations" + type: boolean +- variable: argo-cd.controller.metrics.enabled + label: "Integrate Argo CD with Prometheus" + description: "Argo CD metrics" + group: "Integrations" + type: boolean + show_subquestion_if: true + subquestions: + - variable: argo-cd.controller.metrics.serviceMonitor.enabled + label: Enable a Prometheus ServiceMonitor + description: "Enable a Prometheus ServiceMonitor" + group: "Integrations" + type: boolean + diff --git a/charts/argo-cd/scripts/passgen.py b/charts/argo-cd/scripts/passgen.py new file mode 100755 index 00000000..55392fbb --- /dev/null +++ b/charts/argo-cd/scripts/passgen.py @@ -0,0 +1,14 @@ +#!/bin/python3 +password = b"P@ssword1" + +import subprocess +import sys +try: + __import__("bcrypt") +except ImportError: + subprocess.check_call([sys.executable, "-m", "pip", "install", "bcrypt"]) +finally: + globals()["bcrypt"] = __import__("bcrypt") +from bcrypt import hashpw, gensalt +hashed = hashpw(password, gensalt()) +print(hashed.decode()) diff --git a/charts/argo-cd/scripts/passgen.sh b/charts/argo-cd/scripts/passgen.sh new file mode 100755 index 00000000..10078623 --- /dev/null +++ b/charts/argo-cd/scripts/passgen.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +password='P@ssword1' + +htpasswd -bnBC 10 "" ${password} | tr -d ':\n'; echo diff --git a/charts/argo-cd/templates/NOTES.txt b/charts/argo-cd/templates/NOTES.txt new file mode 100644 index 00000000..d9a4a1ba --- /dev/null +++ b/charts/argo-cd/templates/NOTES.txt @@ -0,0 +1,9 @@ + + █████╗ ██████╗ ██████╗ ██████╗ ██████╗██████╗ +██╔══██╗██╔══██╗██╔════╝ ██╔═══██╗ ██╔════╝██╔══██╗ +███████║██████╔╝██║ ███╗██║ ██║ ██║ ██║ ██║ +██╔══██║██╔══██╗██║ ██║██║ ██║ ██║ ██║ ██║ +██║ ██║██║ ██║╚██████╔╝╚██████╔╝ ╚██████╗██████╔╝ +╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚═════╝ +by Linux Polska + diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml new file mode 100644 index 00000000..d787f9c9 --- /dev/null +++ b/charts/argo-cd/values.yaml @@ -0,0 +1,77 @@ +argo-cd: + global: + domain: "argocd.example.com" + deploymentStrategy: {} + image: + repository: quay.io/argoproj/argocd + tag: "" + imagePullPolicy: IfNotPresent + controller: + resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + metrics: + enabled: false + serviceMonitor: + enabled: false + + configs: + secret: + createSecret: true + # password bcrypt examples in the ./scripts directory + argocdServerAdminPassword: "$2y$10$OXWYhMgV/dkpdMGCj88TJ.MHYIUGfLo7HyKh2KurlrMly9Z595gbq" + # admin with token generation capability + cm: + accounts.admin: apiKey + rbac: + policy.default: | + p, role:admin, capabilities, [apiKey] + crds: + keep: false + + server: + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: "default-selfsigned-ca" + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + tls: true + + redis: + enabled: true + image: + repository: public.ecr.aws/docker/library/redis + tag: 7.2.4-alpine + imagePullPolicy: "" + resources: + limits: + cpu: 200m + memory: 128Mi + requests: + cpu: 100m + memory: 64Mi + + dex: + enabled: false + name: dex-server + metrics: + enabled: false + image: + repository: ghcr.io/dexidp/dex + tag: v2.38.0 + imagePullPolicy: "" + +questionsSpec: + argocdApp: + customImage: false + customResources: false + dexApp: + customImage: false + redisApp: + customImage: false + diff --git a/charts/argocd/6.7.10/README.md b/charts/argocd/6.7.10/README.md deleted file mode 100644 index 63e53890..00000000 --- a/charts/argocd/6.7.10/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Useful links / Przydatne linki -- https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/ -- https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd -- https://github.com/argoproj/argo-cd - -# Installation / Instalacja -## Preparation /Przygotowanie - -```bash -export ARGOCD_NAMESPACE=argocd -export CHART_VERSION=6.7.10 -export DOMAIN_ADDRESS=examaple.com - -kubectl create ns ${ARGOCD_NAMESPACE} -kubectl config set-context --current --namespace=${ARGOCD_NAMESPACE} -``` - -## Installation via helm / Instalacja przy użyciu helm -```bash -helm upgrade --install argocd \ - -n ${ARGOCD_NAMESPACE} \ - -f https://raw.githubusercontent.com/sourcemation/charts/main/charts/argocd/${CHART_VERSION}/values \ - --set "global.domain=${DOMAIN_ADDRESS}" \ - --repo https://argoproj.github.io/argo-helm argo-cd --version ${CHART_VERSION} -``` diff --git a/charts/argocd/6.7.10/values b/charts/argocd/6.7.10/values deleted file mode 100644 index c1dd0443..00000000 --- a/charts/argocd/6.7.10/values +++ /dev/null @@ -1,3 +0,0 @@ -server: - ingress: - enabled: true diff --git a/charts/argocd/current/README.md b/charts/argocd/current/README.md deleted file mode 100644 index 63e53890..00000000 --- a/charts/argocd/current/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Useful links / Przydatne linki -- https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/ -- https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd -- https://github.com/argoproj/argo-cd - -# Installation / Instalacja -## Preparation /Przygotowanie - -```bash -export ARGOCD_NAMESPACE=argocd -export CHART_VERSION=6.7.10 -export DOMAIN_ADDRESS=examaple.com - -kubectl create ns ${ARGOCD_NAMESPACE} -kubectl config set-context --current --namespace=${ARGOCD_NAMESPACE} -``` - -## Installation via helm / Instalacja przy użyciu helm -```bash -helm upgrade --install argocd \ - -n ${ARGOCD_NAMESPACE} \ - -f https://raw.githubusercontent.com/sourcemation/charts/main/charts/argocd/${CHART_VERSION}/values \ - --set "global.domain=${DOMAIN_ADDRESS}" \ - --repo https://argoproj.github.io/argo-helm argo-cd --version ${CHART_VERSION} -```