Skip to content

Commit 7673e91

Browse files
committed
Introducing Orchestrator Software Templates Chart + Infra changes
1 parent 57aa46b commit 7673e91

36 files changed

Lines changed: 1954 additions & 162 deletions

charts/orchestrator-software-templates-infra/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kubeVersion: ">= 1.25.0-0"
1010
type: application
1111
sources:
1212
- https://github.com/redhat-developer/rhdh-software-templates-infrastructure
13-
version: 0.2.0
13+
version: 0.2.2
1414
maintainers:
1515
- name: Red Hat Developer Hub Team
1616
url: https://github.com/redhat-developer/rhdh-chart

charts/orchestrator-software-templates-infra/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Orchestrator Software Templates Infra Chart for OpenShift (Community Version)
33

4-
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square)
4+
![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
A Helm chart to install Openshift GitOps and Openshift Pipelines, which are required operators for installing the Orchestrator Software Templates to be available on RHDH.
@@ -119,7 +119,7 @@ The command removes all the Kubernetes components associated with the chart and
119119
| openshiftGitops.initialApps | Initial applications to deploy | list | `[]` |
120120
| openshiftGitops.initialRepositories | Initial repositories configuration | list | `[]` |
121121
| openshiftGitops.name | name of instances | string | `"argocd"` |
122-
| openshiftGitops.namespaces | namespace of rhdh instance, will be used to install openshift-gitops. | list | `["rhdh"]` |
122+
| openshiftGitops.namespaces | namespace of rhdh instance, will be used to install openshift-gitops. | list | `["orchestrator-gitops"]` |
123123
| openshiftGitops.repositoryCredentials | Repository credential templates | list | `[]` |
124124
| openshiftGitops.secrets | Secrets for Git access or other repository credentials | list | `[]` |
125125
| openshiftGitops.subscription | subscription config | object | `{"namespace":"openshift-operators","spec":{"channel":"latest","disableDefaultArgoCD":true,"installPlanApproval":"Automatic","name":"openshift-gitops-operator","source":"redhat-operators","sourceNamespace":"openshift-marketplace"}}` |

charts/orchestrator-software-templates-infra/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ oc wait --for=condition=Ready pod --all -n openshift-pipelines --timeout=120s
4646
Run the following command to validate that the openshift-gitops namespace and all pods within it are operational:
4747

4848
oc wait --for=jsonpath='{.status.phase}'=Active namespace/openshift-gitops --timeout=80s && \
49-
oc wait --for=condition=Ready pod --all -n {{ .Release.Namespace }} --timeout=120s
49+
oc wait --for=condition=Ready pod --all -n orchestrator-gitops --timeout=120s
5050
{{- end }}

charts/orchestrator-software-templates-infra/templates/catalogsource.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{{- $pipelinesEnabled := .Values.openshiftPipelines.enabled }}
2-
{{- $gitopsEnabled := .Values.openshiftGitops.enabled }}
3-
{{- $shouldCreate := or $pipelinesEnabled $gitopsEnabled }}
1+
{{- $pipelinesUsesOperatorHub := and .Values.openshiftPipelines.enabled (eq .Values.openshiftPipelines.subscription.spec.source "operatorhubio-catalog") }}
2+
{{- $gitopsUsesOperatorHub := and .Values.openshiftGitops.enabled (eq .Values.openshiftGitops.subscription.spec.source "operatorhubio-catalog") }}
3+
{{- $shouldCreate := or $pipelinesUsesOperatorHub $gitopsUsesOperatorHub }}
44

55

66
{{- if $shouldCreate }}
@@ -11,6 +11,10 @@ kind: CatalogSource
1111
metadata:
1212
name: operatorhubio-catalog
1313
namespace: olm
14+
annotations:
15+
"helm.sh/hook": pre-install,pre-upgrade
16+
"helm.sh/hook-weight": "-8"
17+
"helm.sh/hook-delete-policy": before-hook-creation
1418
spec:
1519
sourceType: grpc
1620
image: quay.io/operator-framework/upstream-community-operators:latest

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-application-controller-clusterrole.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
app.kubernetes.io/name: {{ .Values.openshiftGitops.namespaces | first }}-argocd-application-controller
99
app.kubernetes.io/part-of: {{ .Values.openshiftGitops.namespaces | first }}
1010
name: {{ .Values.openshiftGitops.namespaces | first }}-argocd-application-controller
11+
annotations:
12+
"helm.sh/hook": post-install,post-upgrade
13+
"helm.sh/hook-weight": "0"
14+
"helm.sh/hook-delete-policy": before-hook-creation
1115
rules:
1216
- apiGroups: [""]
1317
resources: ["pods"]

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-application-controller-clusterrolebinding.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ metadata:
99
app.kubernetes.io/name: {{ $ns }}-argocd-application-controller
1010
app.kubernetes.io/part-of: {{ $.Values.openshiftGitops.namespaces | first }}
1111
annotations:
12-
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
12+
"helm.sh/hook": post-install,post-upgrade
13+
"helm.sh/hook-weight": "0"
14+
"helm.sh/hook-delete-policy": before-hook-creation
1315
name: {{ $ns }}-argocd-application-controller
1416
roleRef:
1517
apiGroup: rbac.authorization.k8s.io

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-cr.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{- if and .Values.openshiftGitops.namespaces (.Capabilities.APIVersions.Has "argoproj.io/v1beta1/ArgoCD") }}
22
{{- range $ns := .Values.openshiftGitops.namespaces }}
3+
{{- if ne $ns "openshift-gitops" }}
34
---
45
apiVersion: argoproj.io/v1beta1
56
kind: ArgoCD
@@ -8,10 +9,14 @@ metadata:
89
labels:
910
app: {{ $.Values.openshiftGitops.name }}
1011
namespace: {{ $ns }}
12+
annotations:
13+
helm.sh/hook: post-install,post-upgrade
14+
helm.sh/hook-weight: "1"
1115
spec:
1216
applicationInstanceLabelKey: rht-gitops.com/{{ $ns }}
1317
{{- if $.Values.openshiftGitops.argocd_cr }}
1418
{{- $.Values.openshiftGitops.argocd_cr | toYaml | trim | nindent 2 }}
1519
{{- end }}
1620
{{- end }}
1721
{{- end }}
22+
{{- end }}

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-credential-template.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ kind: Secret
77
metadata:
88
name: {{ $cred.name }}
99
namespace: {{ $ns }}
10+
annotations:
11+
"helm.sh/hook": post-install,post-upgrade
12+
"helm.sh/hook-weight": "1"
13+
"helm.sh/hook-delete-policy": before-hook-creation
1014
labels:
1115
argocd.argoproj.io/secret-type: repo-creds
1216
stringData:

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-initial-apps.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ kind: Application
77
metadata:
88
name: {{ $app.name }}
99
namespace: {{ $ns }}
10+
annotations:
11+
helm.sh/hook: post-install,post-upgrade
12+
helm.sh/hook-weight: "2"
1013
spec:
1114
destination:
1215
namespace: {{ $ns }}

charts/orchestrator-software-templates-infra/templates/openshift-gitops/argocd-initial-repositories.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ metadata:
99
namespace: {{ $ns }}
1010
labels:
1111
argocd.argoproj.io/secret-type: repository
12+
annotations:
13+
helm.sh/hook: post-install,post-upgrade
14+
helm.sh/hook-weight: "2"
1215
stringData:
1316
type: {{ $repo.type }}
1417
url: {{ $repo.url }}

0 commit comments

Comments
 (0)