From 040370d089dfcb9ce2b11c09111cd222d1cc47a5 Mon Sep 17 00:00:00 2001 From: Muse Mulatu <48902323+muse-sisay@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:13:44 -0600 Subject: [PATCH] feat: add kubefirst.konstruct.io annotation to argocd apps (#178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add kubefirst.konstruct.io annotation to argocd apps * fix: use ingress in chart * feat: add nginx as ingress class name --------- Co-authored-by: Cristhian Fernández --- CONTRIBUTING.md | 8 ++++++ .../components/argo-events/application.yaml | 3 +++ .../components/argo-rollouts/application.yaml | 3 +++ cilium/components/cilium/application.yaml | 3 +++ .../cluster-autoscaler-civo/application.yaml | 4 +++ .../components/datadog-agent/application.yaml | 3 +++ .../components/flappy-kray/application.yaml | 22 +++++++++++++--- .../components/flappy-kray/ingress.yaml | 26 ------------------- gitlab/components/gitlab/application.yaml | 6 +++-- .../components/goldilocks/application.yaml | 22 ++++++++++++++++ goldilocks/components/goldilocks/ingress.yaml | 26 ------------------- grafana/components/grafana/grafana.yaml | 6 +++-- kafka/components/kafka/application.yaml | 3 +++ kratix/components/kratix/application.yaml | 5 ++++ kubedoom/components/kubedoom/application.yaml | 3 +++ .../components/kubeinvaders/application.yaml | 3 +++ .../kubernetes-dashboard/application.yaml | 5 ++++ .../kubescape-operator/application.yaml | 4 +++ kyverno/components/kyverno/kyverno.yaml | 3 +++ .../metrics-server/application.yaml | 4 +++ mysql/components/mysql/application.yaml | 3 +++ opencost/components/opencost/opencost.yaml | 6 +++-- polaris/components/polaris/application.yaml | 4 +++ .../spinkube-operator/spinkube-operator.yaml | 6 +++-- .../stormforge-agent/application.yaml | 6 +++-- supabase/components/supabase/application.yaml | 3 +++ testkube/components/testkube/application.yaml | 3 +++ .../components/tracetest/application.yaml | 3 +++ .../components/typesense/application.yaml | 2 ++ .../vertical-pod-autoscaler/application.yaml | 4 +++ yourls/components/yourls/application.yaml | 3 +++ 31 files changed, 140 insertions(+), 65 deletions(-) delete mode 100644 flappy-kray/components/flappy-kray/ingress.yaml delete mode 100644 goldilocks/components/goldilocks/ingress.yaml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9462b05..7b8f1a6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,14 @@ To make a new application available for installation, you'll need to: - Create a new directory with your new application's name in your fork. - Create a `components` folder, and inside, another folder with your application's name. - In that latest folder, add, and organize your Argo CD manifest file(s) into it. + - Annotate your Argo CD application with the following annotations. The Kubefirst platform uses this information to surface installed application in the UI. + + ```yaml + annotations: + kubefirst.konstruct.io/application-name: + kubefirst.konstruct.io/source: catalog-templates + ``` + - Don't forget to look at the [Kubefirst Tokens](#kubefirst-tokens) section as you can dynamically add specific values to your manifests like domain or cluster names. - In the root folder of your application create an "App of Apps" YAML file that will point to the component folder. - Add a SVG file of the application's logo, named `.svg` under the [logos folder](https://github.com/kubefirst/gitops-catalog/tree/main/logos). diff --git a/argo-events/components/argo-events/application.yaml b/argo-events/components/argo-events/application.yaml index 94a41f4..e54991c 100644 --- a/argo-events/components/argo-events/application.yaml +++ b/argo-events/components/argo-events/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -argo-events namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: argo-events + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/argo-rollouts/components/argo-rollouts/application.yaml b/argo-rollouts/components/argo-rollouts/application.yaml index 71b2f1d..4602daa 100644 --- a/argo-rollouts/components/argo-rollouts/application.yaml +++ b/argo-rollouts/components/argo-rollouts/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -argo-rollouts namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: argo-rollouts + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/cilium/components/cilium/application.yaml b/cilium/components/cilium/application.yaml index faf11c2..8bd0130 100644 --- a/cilium/components/cilium/application.yaml +++ b/cilium/components/cilium/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -cilium namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: cilium + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/cluster-autoscaler-civo/components/cluster-autoscaler-civo/application.yaml b/cluster-autoscaler-civo/components/cluster-autoscaler-civo/application.yaml index 95edd69..c59c93e 100644 --- a/cluster-autoscaler-civo/components/cluster-autoscaler-civo/application.yaml +++ b/cluster-autoscaler-civo/components/cluster-autoscaler-civo/application.yaml @@ -6,6 +6,10 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '20' + kubefirst.konstruct.io/application-name: cluster-autoscaler-civo + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/datadog-agent/components/datadog-agent/application.yaml b/datadog-agent/components/datadog-agent/application.yaml index d99128a..2b57de2 100644 --- a/datadog-agent/components/datadog-agent/application.yaml +++ b/datadog-agent/components/datadog-agent/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -datadog namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: datadog-agent + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/flappy-kray/components/flappy-kray/application.yaml b/flappy-kray/components/flappy-kray/application.yaml index 8be8c7d..a56dfdf 100644 --- a/flappy-kray/components/flappy-kray/application.yaml +++ b/flappy-kray/components/flappy-kray/application.yaml @@ -4,10 +4,12 @@ kind: Application metadata: name: -flappy-kray namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io annotations: argocd.argoproj.io/sync-wave: '0' + kubefirst.konstruct.io/application-name: flappy-kray + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: flappy-kray @@ -20,8 +22,22 @@ spec: values: | image: repository: ghcr.io/konstructio/flappy-kray + ingress: - enabled: false + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + argocd.argoproj.io/sync-wave: '1' + hosts: + - host: flappy-kray. + paths: + - path: / + pathType: Prefix + tls: + - secretName: flappy-kray-tls + hosts: + - flappy-kray. project: syncPolicy: syncOptions: diff --git a/flappy-kray/components/flappy-kray/ingress.yaml b/flappy-kray/components/flappy-kray/ingress.yaml deleted file mode 100644 index 798c305..0000000 --- a/flappy-kray/components/flappy-kray/ingress.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - argocd.argoproj.io/sync-wave: '1' - name: flappy-kray - namespace: flappy-kray -spec: - ingressClassName: nginx - rules: - - host: flappy-kray. - http: - paths: - - backend: - service: - name: -flappy-kray - port: - number: 80 - path: / - pathType: Prefix - tls: - - hosts: - - flappy-kray. - secretName: flappy-kray-tls diff --git a/gitlab/components/gitlab/application.yaml b/gitlab/components/gitlab/application.yaml index 9dce6b2..a2c9b00 100644 --- a/gitlab/components/gitlab/application.yaml +++ b/gitlab/components/gitlab/application.yaml @@ -100,10 +100,12 @@ kind: Application metadata: name: gitlab namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io annotations: argocd.argoproj.io/sync-wave: '30' + kubefirst.konstruct.io/application-name: gitlab + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: name: diff --git a/goldilocks/components/goldilocks/application.yaml b/goldilocks/components/goldilocks/application.yaml index 88797bd..560f04b 100644 --- a/goldilocks/components/goldilocks/application.yaml +++ b/goldilocks/components/goldilocks/application.yaml @@ -6,12 +6,34 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '10' + kubefirst.konstruct.io/application-name: goldilocks + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: repoURL: 'https://charts.fairwinds.com/stable' targetRevision: 6.5.6 chart: goldilocks + values: | + dashboard: + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + argocd.argoproj.io/sync-wave: '1' + hosts: + - host: goldilocks. + paths: + - path: / + type: ImplementationSpecific + + tls: + - secretName: goldilocks-tls + hosts: + - goldilocks. destination: name: namespace: goldilocks diff --git a/goldilocks/components/goldilocks/ingress.yaml b/goldilocks/components/goldilocks/ingress.yaml deleted file mode 100644 index c7a2272..0000000 --- a/goldilocks/components/goldilocks/ingress.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - argocd.argoproj.io/sync-wave: '1' - name: goldilocks - namespace: goldilocks -spec: - ingressClassName: nginx - rules: - - host: goldilocks. - http: - paths: - - backend: - service: - name: -goldilocks-dashboard - port: - number: 80 - path: / - pathType: Prefix - tls: - - hosts: - - goldilocks. - secretName: goldilocks-tls diff --git a/grafana/components/grafana/grafana.yaml b/grafana/components/grafana/grafana.yaml index 2821e25..f16185f 100644 --- a/grafana/components/grafana/grafana.yaml +++ b/grafana/components/grafana/grafana.yaml @@ -2,10 +2,12 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - annotations: - argocd.argoproj.io/sync-wave: '20' name: -grafana namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: '20' + kubefirst.konstruct.io/application-name: grafana + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/kafka/components/kafka/application.yaml b/kafka/components/kafka/application.yaml index c806a40..cf82a02 100644 --- a/kafka/components/kafka/application.yaml +++ b/kafka/components/kafka/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -kafka namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kafka + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/kratix/components/kratix/application.yaml b/kratix/components/kratix/application.yaml index c616c9f..058c770 100644 --- a/kratix/components/kratix/application.yaml +++ b/kratix/components/kratix/application.yaml @@ -4,6 +4,11 @@ kind: Application metadata: name: -kratix namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kratix + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/kubedoom/components/kubedoom/application.yaml b/kubedoom/components/kubedoom/application.yaml index 916266c..f05cc03 100644 --- a/kubedoom/components/kubedoom/application.yaml +++ b/kubedoom/components/kubedoom/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -kubedoom namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kubedoom + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/kubeinvaders/components/kubeinvaders/application.yaml b/kubeinvaders/components/kubeinvaders/application.yaml index 99545ee..bf8b299 100644 --- a/kubeinvaders/components/kubeinvaders/application.yaml +++ b/kubeinvaders/components/kubeinvaders/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -kubeinvaders namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kubeinvaders + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/kubernetes-dashboard/components/kubernetes-dashboard/application.yaml b/kubernetes-dashboard/components/kubernetes-dashboard/application.yaml index dd285db..bbf828f 100644 --- a/kubernetes-dashboard/components/kubernetes-dashboard/application.yaml +++ b/kubernetes-dashboard/components/kubernetes-dashboard/application.yaml @@ -4,6 +4,11 @@ kind: Application metadata: name: -kubernetes-dashboard namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kubernetes-dashboard + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/kubescape-operator/components/kubescape-operator/application.yaml b/kubescape-operator/components/kubescape-operator/application.yaml index 143a610..f8a3c4a 100644 --- a/kubescape-operator/components/kubescape-operator/application.yaml +++ b/kubescape-operator/components/kubescape-operator/application.yaml @@ -6,6 +6,10 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '10' + kubefirst.konstruct.io/application-name: kubescape-operator + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/kyverno/components/kyverno/kyverno.yaml b/kyverno/components/kyverno/kyverno.yaml index 0e510ee..171dec5 100644 --- a/kyverno/components/kyverno/kyverno.yaml +++ b/kyverno/components/kyverno/kyverno.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -kyverno namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: kyverno + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/metrics-server/components/metrics-server/application.yaml b/metrics-server/components/metrics-server/application.yaml index 462610c..ebe3755 100644 --- a/metrics-server/components/metrics-server/application.yaml +++ b/metrics-server/components/metrics-server/application.yaml @@ -6,6 +6,10 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '10' + kubefirst.konstruct.io/application-name: metrics-server + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/mysql/components/mysql/application.yaml b/mysql/components/mysql/application.yaml index f711b1d..3e028f7 100644 --- a/mysql/components/mysql/application.yaml +++ b/mysql/components/mysql/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -mysql namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: mysql + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/opencost/components/opencost/opencost.yaml b/opencost/components/opencost/opencost.yaml index f0389ac..1fed299 100644 --- a/opencost/components/opencost/opencost.yaml +++ b/opencost/components/opencost/opencost.yaml @@ -2,10 +2,12 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - annotations: - argocd.argoproj.io/sync-wave: '20' name: -opencost namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: '20' + kubefirst.konstruct.io/application-name: opencost + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/polaris/components/polaris/application.yaml b/polaris/components/polaris/application.yaml index a77485a..dda5591 100644 --- a/polaris/components/polaris/application.yaml +++ b/polaris/components/polaris/application.yaml @@ -6,6 +6,10 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '10' + kubefirst.konstruct.io/application-name: polaris + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/spinkube-operator/components/spinkube-operator/spinkube-operator.yaml b/spinkube-operator/components/spinkube-operator/spinkube-operator.yaml index 13476f6..6546442 100644 --- a/spinkube-operator/components/spinkube-operator/spinkube-operator.yaml +++ b/spinkube-operator/components/spinkube-operator/spinkube-operator.yaml @@ -2,10 +2,12 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - annotations: - argocd.argoproj.io/sync-wave: '60' name: -spinkube-operator namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: '60' + kubefirst.konstruct.io/application-name: spinkube-operator + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/stormforge-agent/components/stormforge-agent/application.yaml b/stormforge-agent/components/stormforge-agent/application.yaml index c5f5228..402516a 100644 --- a/stormforge-agent/components/stormforge-agent/application.yaml +++ b/stormforge-agent/components/stormforge-agent/application.yaml @@ -4,10 +4,12 @@ kind: Application metadata: name: -stormforge-agent namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io annotations: argocd.argoproj.io/sync-wave: '3' + kubefirst.konstruct.io/application-name: stormforge-agent + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: stormforge-system diff --git a/supabase/components/supabase/application.yaml b/supabase/components/supabase/application.yaml index 8d49247..9383d1b 100644 --- a/supabase/components/supabase/application.yaml +++ b/supabase/components/supabase/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -supabase namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: supabase + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/testkube/components/testkube/application.yaml b/testkube/components/testkube/application.yaml index 92b2917..cd7c8a4 100644 --- a/testkube/components/testkube/application.yaml +++ b/testkube/components/testkube/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -testkube namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: testkube + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/tracetest/components/tracetest/application.yaml b/tracetest/components/tracetest/application.yaml index 6087467..c3f1125 100644 --- a/tracetest/components/tracetest/application.yaml +++ b/tracetest/components/tracetest/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -tracetest namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: tracetest + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/typesense/components/typesense/application.yaml b/typesense/components/typesense/application.yaml index 43787e4..8aee564 100644 --- a/typesense/components/typesense/application.yaml +++ b/typesense/components/typesense/application.yaml @@ -6,6 +6,8 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '20' + kubefirst.konstruct.io/application-name: typesense + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/vertical-pod-autoscaler/components/vertical-pod-autoscaler/application.yaml b/vertical-pod-autoscaler/components/vertical-pod-autoscaler/application.yaml index 7343e04..55499e7 100644 --- a/vertical-pod-autoscaler/components/vertical-pod-autoscaler/application.yaml +++ b/vertical-pod-autoscaler/components/vertical-pod-autoscaler/application.yaml @@ -6,6 +6,10 @@ metadata: namespace: argocd annotations: argocd.argoproj.io/sync-wave: '10' + kubefirst.konstruct.io/application-name: vertical-pod-autoscaler + kubefirst.konstruct.io/source: catalog-templates + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: source: diff --git a/yourls/components/yourls/application.yaml b/yourls/components/yourls/application.yaml index 5809bdc..d2c8f6d 100644 --- a/yourls/components/yourls/application.yaml +++ b/yourls/components/yourls/application.yaml @@ -4,6 +4,9 @@ kind: Application metadata: name: -yourls namespace: argocd + annotations: + kubefirst.konstruct.io/application-name: yourls + kubefirst.konstruct.io/source: catalog-templates finalizers: - resources-finalizer.argocd.argoproj.io spec: