Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app-dev/devops-and-containers/oke/oke-gitops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ This stack will:
* Create 2 OCI Code Repositories: one with pipelines definitions, and another one called "oke-cluster-config" with the git template for the OKE cluster administrators
* Create an OCI Build Pipeline that will mirror the ArgoCD Helm Chart inside the Oracle Cloud Registry, and deploy it in the chosen cluster

[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/releases/download/oke-gitops-1.1.0/stack.zip)
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/releases/download/oke-gitops-1.1.1/stack.zip)

Once the stack has been provisioned, you can modify the ArgoCD version to deploy by editing the `mirror_argo.yaml` file in the `pipelines` repository.
By default, ArgoCD will be deployed in an "insecure" mode to disable the default SSL certificate, but feel free to modify the chart values in the `argo-cd-chart-values` artifact.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"chart": {
"repo": "https://example-app/chart",
"name": "app",
"version": "*",
"release-name": "example-app"
},
"namespace": "default"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"chart": {
"repo": "https://example-app/chart",
"name": "app",
"version": "1.0.0",
"release-name": "example-app"
},
"namespace": "default"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: example-app
description: A Helm chart for example-app
type: application
version: 0.1.0
appVersion: "1.0.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
ports:
- containerPort: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 80
protocol: TCP
selector:
app: {{ .Chart.Name }}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: example-app
namespace: argocd
spec:
goTemplate: true
goTemplateOptions: [ "missingkey=error" ]
generators:
- matrix:
generators:
- clusters:
selector:
matchLabels:
type: "hub"
- git:
repoURL: #REPOURL
revision: HEAD
files:
- path: "apps/app-category/example-app/config/config-{{.metadata.labels.type}}.json"

# If you want to delete everything if the Application is deleted, set this to false and then delete the Application. This is just a safeguard
syncPolicy:
preserveResourcesOnDeletion: true
template:
metadata:
name: '{{index .path.segments 2}}-{{.nameNormalized}}'
spec:
project: default
sources:

- repoURL: '{{.chart.repo}}'
chart: '{{.chart.name}}'
targetRevision: '{{.chart.version}}'
helm:
releaseName: '{{.chart.releaseName}}'
valueFiles:
- $values/apps/{{index .path.segments 1}}/{{index .path.segments 2}}/helm/values/values-common.yml
- $values/apps/{{index .path.segments 1}}/{{index .path.segments 2}}/helm/values/values-{{.metadata.labels.type }}.yml

- repoURL: #REPOURL
targetRevision: HEAD
path: apps/{{index .path.segments 1}}/{{index .path.segments 2}}/kustomize/overlays/{{ .metadata.labels.type }}

- repoURL: #REPOURL
targetRevision: HEAD
ref: values
destination:
server: '{{.server}}'
namespace: '{{.namespace}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
automated:
prune: true
selfHeal: true
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Kustomize application containing cluster configurations for the hub cluster.


apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: hub-config
name: hub-infra
namespace: argocd
spec:
goTemplate: true
Expand All @@ -15,22 +12,26 @@ spec:
matchLabels:
type: "hub"


# If you want to delete everything if the Application is deleted, set this to false and then delete the Application. This is just a safeguard
syncPolicy:
preserveResourcesOnDeletion: true
template:
metadata:
name: 'hub-config'
name: 'hub-infra'
spec:
project: default
sources:
# Global config for each cluster
- repoURL: {{ .Values.repo }}
- repoURL: #REPOURL
targetRevision: HEAD
path: apps/kustomize/config/env-type/{{ "{{" }}.metadata.labels.type{{ "}}" }}
path: infra/overlays/{{ .metadata.labels.type }}

- repoURL: #REPOURL
targetRevision: HEAD
ref: values
destination:
server: '{{ "{{" }}.server{{ "}}" }}'
namespace: argocd
server: '{{.server}}'
namespace: default
syncPolicy:
syncOptions:
- CreateNamespace=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# Insert Git repository where the cluster configurations are located, with .git postfix. This template has to be applied manually
# Insert Git repository with .git postfix. This template has to be applied manually

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps-cluster-config
name: hub-apps
namespace: argocd
spec:
project: default
source:
repoURL: ${REPO}
repoURL: #RepoURL
targetRevision: HEAD
path: appsets
helm:
parameters:
- name: repo
value: ${REPO}
path: appsets/hub
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: argocd
Expand Down
Loading