diff --git a/README.md b/README.md index 9b0ec34d2e..8ee50e9a83 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ This repository contains example applications for demoing ArgoCD functionality. to register this repository to your ArgoCD instance, or fork this repo and push your own commits to explore ArgoCD and GitOps! + + + | Application | Description | |-------------|-------------| | [guestbook](guestbook/) | A hello word guestbook app as plain YAML | diff --git a/helm-guestbook/confi/values-mt.yaml b/helm-guestbook/confi/values-mt.yaml deleted file mode 100644 index 5ba6169c7d..0000000000 --- a/helm-guestbook/confi/values-mt.yaml +++ /dev/null @@ -1,26 +0,0 @@ - -# Default values for helm-guestbook. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 3 - -image: - repository: gcr.io/heptio-images/ks-guestbook-demo - tag: 0.1 - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 89 - -ingress: - enabled: false - annotations: - kubernetes.io/ingress.class: nginx - kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - - diff --git a/helm-guestbook/values.yaml b/helm-guestbook/values.yaml index 4c4af225a8..15c564d538 100644 --- a/helm-guestbook/values.yaml +++ b/helm-guestbook/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: 3 +replicaCount: 1 image: repository: gcr.io/heptio-images/ks-guestbook-demo @@ -13,7 +13,7 @@ containerPort: 80 service: type: ClusterIP - port: 88 + port: 80 ingress: enabled: false @@ -28,17 +28,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi nodeSelector: {} diff --git a/helm2/.DS_Store b/helm2/.DS_Store new file mode 100644 index 0000000000..fd7671c47f Binary files /dev/null and b/helm2/.DS_Store differ diff --git a/helm2/app1/.DS_Store b/helm2/app1/.DS_Store new file mode 100644 index 0000000000..5008ddfcf5 Binary files /dev/null and b/helm2/app1/.DS_Store differ diff --git a/helm2/app1/appset.yaml b/helm2/app1/appset.yaml new file mode 100644 index 0000000000..af6350822d --- /dev/null +++ b/helm2/app1/appset.yaml @@ -0,0 +1,40 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: helm-k8s-app +spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] + generators: + - git: + repoURL: https://github.com/wings-software/gitops-automation.git + revision: syncstepautomation-mirko + files: + - path: "helm2/app1/*/*/config.json" + template: + metadata: + name: syncstep-automation-app-{{.cluster.name}} + labels: + harness.io/envRef: '{{.envTag}}' + harness.io/serviceRef: '{{.serviceTag}}' + harness.io/buildRef: '{{.releaseTag}}' + spec: + project: 5b02f9dc + source: + chart: fluent-bit + repoURL: https://grafana.github.io/helm-charts + targetRevision: 2.6.0 + helm: + values: |- + config: + port: '{{.cluster.port}}' + path: '{{.path.path}}' + basename: '{{.path.basename}}' + destination: + server: '{{.cluster.address}}' + namespace: '{{.envTag}}' + syncPolicy: + syncOptions: + - Validate=true + - CreateNamespace=true + diff --git a/helm2/app1/prod/cluster11/config.json b/helm2/app1/prod/cluster11/config.json new file mode 100644 index 0000000000..7ba21677b8 --- /dev/null +++ b/helm2/app1/prod/cluster11/config.json @@ -0,0 +1,11 @@ +{ + "cluster" : { + "name" : "cluster11", + "address" : "https://35.233.139.33", + "port" : "5450" + }, + "releaseTag" : "1.15", + "envTag" : "prod", + "replicas" : "1", + "serviceTag" : "helm" +} diff --git a/helm2/app1/prod/in-cluster/config.json b/helm2/app1/prod/in-cluster/config.json new file mode 100644 index 0000000000..2ce39ac64f --- /dev/null +++ b/helm2/app1/prod/in-cluster/config.json @@ -0,0 +1,11 @@ +{ + "cluster" : { + "name" : "incluster", + "address" : "https://35.233.139.33", + "port" : "5450" + }, + "releaseTag" : "1.15", + "envTag" : "Prod", + "replicas" : "1", + "serviceTag" : "helm" +} diff --git a/helm2/app1/qa/cluster22/config.json b/helm2/app1/qa/cluster22/config.json new file mode 100644 index 0000000000..d22394320b --- /dev/null +++ b/helm2/app1/qa/cluster22/config.json @@ -0,0 +1,11 @@ +{ + "cluster" : { + "name" : "cluster22", + "address" : "https://35.233.139.33", + "port" : "5450" + }, + "releaseTag" : "1.15", + "envTag" : "qa", + "replicas" : "1", + "serviceTag" : "helm" +} diff --git a/helm2/app1/qa/cluster22/test b/helm2/app1/qa/cluster22/test new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/helm2/app1/qa/cluster22/test @@ -0,0 +1 @@ + diff --git a/helm2/cluster/appset.yaml b/helm2/cluster/appset.yaml new file mode 100644 index 0000000000..2244f1c25f --- /dev/null +++ b/helm2/cluster/appset.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: cluster-appset-all +spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] + generators: + - clusters: {} + template: + metadata: + name: cluster-appset-all-{{.name}} + labels: + # harness.io/envRef: {{.values.env}} + harness.io/envRef: prod + harness.io/serviceRef: helm + spec: + project: f5384cd4 + source: + path: helm-nginx + repoURL: https://github.com/wings-software/gitops-automation + targetRevision: appset-demo + + destination: + server: '{{.server}}' # 'server' field of the secret + namespace: cluster-appset-all-{{.nameNormalized}} + syncPolicy: + syncOptions: + - Validate=true + - CreateNamespace=true