Skip to content

Commit

Permalink
feat(argocd): ApplicationSet for Core stack (#4741)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
nlamirault authored Dec 29, 2023
1 parent c26d992 commit d3ed418
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 497 deletions.
2 changes: 2 additions & 0 deletions gitops/argocd/apps/k3s/homelab/core/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ annotations:
fieldSpecs:
- path: metadata/annotations
create: true
- path: spec/template/metadata/annotations
create: true
105 changes: 105 additions & 0 deletions gitops/argocd/apps/k3s/homelab/core/applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: core
labels:
app.kubernetes.io/name: core
app.kubernetes.io/instance: core-argocd-applicationset
app.kubernetes.io/component: argocd-applicationset
app.kubernetes.io/part-of: core-argocd
spec:
generators:
- list:
elements:
- appName: metrics-server
namespace: kube-system
path: gitops/argocd/charts/kube-system/metrics-server
targetRevision: master
- appName: sealed-secrets
namespace: kube-system
path: gitops/argocd/charts/kube-system/sealed-secrets
targetRevision: master
- appName: external-secrets
namespace: kube-system
path: gitops/argocd/charts/kube-system/external-secrets
targetRevision: master
- appName: nfs-subdir-external-provisioner
namespace: kube-system
path: gitops/argocd/charts/kube-system/nfs-subdir-external-provisioner
targetRevision: master
# - appName: argo-workflows
# namespace: gitops
# path: gitops/argocd/charts/gitops/argo-workflows
# targetRevision: master
# - appName: argo-rollouts
# namespace: gitops
# path: gitops/argocd/charts/gitops/argo-rollouts
# targetRevision: master
# - appName: argo-events
# namespace: gitops
# path: gitops/argocd/charts/gitops/argo-events
# targetRevision: master
- appName: kargo
namespace: gitops
path: gitops/argocd/charts/gitops/kargo
targetRevision: master
template:
metadata:
name: "{{appName}}"
annotations:
# https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/#webhook-and-manifest-paths-annotation
argocd.argoproj.io/manifest-generate-paths: "/{{path}}"
finalizers:
- resources-finalizer.argocd.argoproj.io
labels:
app.kubernetes.io/name: "{{appName}}"
app.kubernetes.io/instance: "{{appName}}-argocd-application"
app.kubernetes.io/component: argocd-application
app.kubernetes.io/part-of: "{{appName}}-argocd"
spec:
destination:
namespace: "{{namespace}}"
server: https://kubernetes.default.svc
project: portefaix-k3s-homelab
source:
repoURL: https://github.com/portefaix/portefaix-kubernetes.git
targetRevision: "{{targetRevision}}"
path: "{{path}}"
helm:
valueFiles:
- values.yaml
- values-k3s-homelab.yaml
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- Validate=false
- SkipDryRunOnMissingResource=true
- ApplyOutOfSyncOnly=true
# - ServerSideApply=true
# retry:
# limit: 5
# backoff:
# duration: 5s
# factor: 2
# maxDuration: 3m0s
61 changes: 0 additions & 61 deletions gitops/argocd/apps/k3s/homelab/core/argo-events.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions gitops/argocd/apps/k3s/homelab/core/argo-rollouts.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions gitops/argocd/apps/k3s/homelab/core/argo-workflows.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions gitops/argocd/apps/k3s/homelab/core/external-secrets.yaml

This file was deleted.

Loading

0 comments on commit d3ed418

Please sign in to comment.