-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from natrontech/argocd-structure
fix: new structure according to argocd
- Loading branch information
Showing
14 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ dist/ | |
_temp/ | ||
|
||
./momentum-core/momentum-core | ||
./momentum-core/.vscode/ |
26 changes: 26 additions & 0 deletions
26
momentum-structure/momentum-root-argocd/{application}/_base/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
namespace: argocd | ||
annotations: | ||
pref.argocd.argoproj.io/default-view: network | ||
pref.argocd.argoproj.io/default-pod-sort: parentResource | ||
spec: | ||
source: | ||
chart: {{ .HelmChartName }} | ||
repoURL: {{ .HelmRepoUrl }} | ||
targetRevision: {{ .HelmChartVersion }} | ||
helm: | ||
releaseName: {{ .ApplicationName }} | ||
valuesObject: | ||
destination: | ||
server: "https://kubernetes.default.svc" | ||
namespace: to-be-patched | ||
syncPolicy: | ||
automated: | ||
allowEmpty: true | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |
13 changes: 13 additions & 0 deletions
13
momentum-structure/momentum-root-argocd/{application}/_base/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- application.yaml | ||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
gitops.natron.io/application: '{{ .ApplicationName }}' | ||
patches: | ||
- path: values.yaml | ||
target: | ||
kind: Application | ||
|
9 changes: 9 additions & 0 deletions
9
momentum-structure/momentum-root-argocd/{application}/_base/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
spec: | ||
source: | ||
helm: | ||
valuesObject: | ||
|
8 changes: 8 additions & 0 deletions
8
momentum-structure/momentum-root-argocd/{application}/{stage}/_argo/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- project.yaml | ||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
gitops.natron.io/app: "{{ .ApplicationName }}" |
20 changes: 20 additions & 0 deletions
20
momentum-structure/momentum-root-argocd/{application}/{stage}/_argo/project.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: AppProject | ||
metadata: | ||
name: {{ .ApplicationName }}-{{ .StageNames }} | ||
namespace: argocd | ||
spec: | ||
clusterResourceWhitelist: | ||
- group: '*' | ||
kind: '*' | ||
description: This is the Project for {{ .ApplicationName }} | ||
destinations: | ||
- name: in-cluster | ||
namespace: {{ .ApplicationName }}-{{ .StageNames }}-* | ||
server: https://kubernetes.default.svc | ||
namespaceResourceWhitelist: | ||
- group: '*' | ||
kind: '*' | ||
# sourceRepos: | ||
orphanedResources: | ||
warn: false |
6 changes: 6 additions & 0 deletions
6
momentum-structure/momentum-root-argocd/{application}/{stage}/_base/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
spec: | ||
project: {{ .ApplicationName }}-{{ .StageNames }} |
15 changes: 15 additions & 0 deletions
15
momentum-structure/momentum-root-argocd/{application}/{stage}/_base/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../_base/ | ||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
gitops.natron.io/app: "{{ .ApplicationName }}" | ||
patches: | ||
- path: application.yaml | ||
target: | ||
kind: Application | ||
- path: values.yaml | ||
target: | ||
kind: Application |
8 changes: 8 additions & 0 deletions
8
momentum-structure/momentum-root-argocd/{application}/{stage}/_base/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
spec: | ||
source: | ||
helm: | ||
valuesObject: |
5 changes: 5 additions & 0 deletions
5
...tructure/momentum-root-argocd/{application}/{stage}/_deploy/{deployment}/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
spec: | ||
destination: | ||
namespace: {{ .ApplicationName }}-{{ .StageNames }} |
42 changes: 42 additions & 0 deletions
42
...ucture/momentum-root-argocd/{application}/{stage}/_deploy/{deployment}/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../_base/ # applications _base | ||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
# Patched on stage above // wont work if addtionall resources are added on this level | ||
#gitops.natron.io/app: "" | ||
gitops.natron.io/stage: "{{ .StageName }}" | ||
patches: | ||
- path: application.yaml | ||
target: | ||
kind: Application | ||
- path: values.yaml | ||
target: | ||
kind: Application | ||
- path: secrets.yaml | ||
target: | ||
kind: Application | ||
- target: | ||
kind: Application | ||
name: .* | ||
patch: |- | ||
- op: replace | ||
path: /metadata/name | ||
# {{ .ApplicationName }}-{{ .StageNames }} | ||
value: {{ .MetadataName }} | ||
- target: | ||
group: image.toolkit.fluxcd.io | ||
name: .* | ||
patch: |- | ||
- op: replace | ||
path: /metadata/namespace | ||
value: {{ .MetadataName }} | ||
- target: | ||
group: notification.toolkit.fluxcd.io | ||
name: .* | ||
patch: |- | ||
- op: replace | ||
path: /metadata/namespace | ||
value: {{ .MetadataName }} |
9 changes: 9 additions & 0 deletions
9
...um-structure/momentum-root-argocd/{application}/{stage}/_deploy/{deployment}/secrets.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
spec: | ||
source: | ||
helm: | ||
valuesObject: | ||
|
9 changes: 9 additions & 0 deletions
9
...tum-structure/momentum-root-argocd/{application}/{stage}/_deploy/{deployment}/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: to-be-patched | ||
spec: | ||
source: | ||
helm: | ||
valuesObject: | ||
|
5 changes: 5 additions & 0 deletions
5
momentum-structure/momentum-root-argocd/{application}/{stage}/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./_deploy/prod/ | ||
#- ./_deploy/dev/ |