Compare commits

...

3 Commits

Author SHA1 Message Date
sass1997 39168c73fe
Merge 3abafe0361 into d7927a27b4 2023-12-20 14:23:04 +08:00
Anand Francis Joseph d7927a27b4
Template variable for container port (#251)
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
2023-11-15 09:00:20 -05:00
Roman Kathriner 3abafe0361 Add way to enable app of apps in kustomize way 2020-05-15 23:41:08 +02:00
10 changed files with 158 additions and 1 deletions

View File

@ -0,0 +1,4 @@
SERVER=https://kubernetes.default.svc
REPO_URL=https://github.com/argoproj/argocd-example-apps
TARGET_REVISION=HEADs
PROJECT=default

View File

@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-guestbook
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: helm-guestbook
server: $(SERVER)
project: $(PROJECT)
source:
path: helm-guestbook
repoURL: $(REPO_URL)
targetRevision: $(TARGET_REVISION)

View File

@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-hooks
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: helm-hooks
server: $(SERVER)
project: $(PROJECT)
source:
path: helm-hooks
repoURL: $(REPO_URL)
targetRevision: $(TARGET_REVISION)

View File

@ -0,0 +1,47 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configurations:
- kustomize-argocd-config.yaml
resources:
- helm-guestbook.yaml
- helm-hooks.yaml
- kustomize-guestbook.yaml
- namespaces.yaml
- sync-waves.yaml
configMapGenerator:
- name: argocd-env
envs:
- config.env
vars:
- name: SERVER
objref:
kind: ConfigMap
name: argocd-env
apiVersion: v1
fieldref:
fieldpath: data.SERVER
- name: TARGET_REVISION
objref:
kind: ConfigMap
name: argocd-env
apiVersion: v1
fieldref:
fieldpath: data.TARGET_REVISION
- name: PROJECT
objref:
kind: ConfigMap
name: argocd-env
apiVersion: v1
fieldref:
fieldpath: data.PROJECT
- name: REPO_URL
objref:
kind: ConfigMap
name: argocd-env
apiVersion: v1
fieldref:
fieldpath: data.REPO_URL

View File

@ -0,0 +1,13 @@
varReference:
- path: spec/destination/namespace
kind: Application
apiVersion: argoproj.io/v1alpha1
- path: spec/destination/server
kind: Application
apiVersion: argoproj.io/v1alpha1
- path: spec/project
kind: Application
apiVersion: argoproj.io/v1alpha1
- path: spec/source/targetRevision
kind: Application
apiVersion: argoproj.io/v1alpha1

View File

@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kustomize-guestbook
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: kustomize-guestbook
server: $(SERVER)
project: $(PROJECT)
source:
path: kustomize-guestbook
repoURL: $(REPO_URL)
targetRevision: $(TARGET_REVISION)

View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: Namespace
metadata:
name: helm-guestbook
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: helm-hooks
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: kustomize-guestbook
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: sync-waves
annotations:
argocd.argoproj.io/sync-wave: "-1"

View File

@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sync-waves
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: sync-waves
server: $(SERVER)
project: $(PROJECT)
source:
path: sync-waves
repoURL: $(REPO_URL)
targetRevision: $(TARGET_REVISION)

View File

@ -26,7 +26,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
containerPort: {{ .Values.containerPort }}
protocol: TCP
livenessProbe:
httpGet:

View File

@ -9,6 +9,8 @@ image:
tag: 0.1
pullPolicy: IfNotPresent
containerPort: 80
service:
type: ClusterIP
port: 80