-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
163 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v2 | ||
name: group-sync-operator | ||
description: Group Sync Operator | ||
type: application | ||
version: 1.0.0 | ||
|
||
dependencies: | ||
- name: junitreporter | ||
version: 1.0.0 | ||
repository: "file://../../sub-charts/junitreporter/" | ||
condition: junitreporter.devops_mongo_uri != "" |
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,3 @@ | ||
Group Sync Operator | ||
=============================================================================== | ||
Installs the Group Sync Operator. Minimum required version: 0.0.31 |
15 changes: 15 additions & 0 deletions
15
cluster-applications/052-group-sync-operator/templates/01-gso_OperatorGroup.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: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: group-sync-operator | ||
namespace: group-sync-operator | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "052" | ||
{{- if .Values.custom_labels }} | ||
labels: | ||
{{ .Values.custom_labels | toYaml | indent 4 }} | ||
{{- end }} | ||
spec: | ||
targetNamespaces: | ||
- group-sync-operator |
18 changes: 18 additions & 0 deletions
18
cluster-applications/052-group-sync-operator/templates/02-gso_Subcription.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,18 @@ | ||
--- | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: group-sync-operator | ||
namespace: group-sync-operator | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "052" | ||
{{- if .Values.custom_labels }} | ||
labels: | ||
{{ .Values.custom_labels | toYaml | indent 4 }} | ||
{{- end }} | ||
spec: | ||
channel: "{{ .Values.group_sync_operator_channel }}" | ||
installPlanApproval: {{ .Values.group_sync_operator_install_plan | default "Automatic" | quote }} | ||
name: group-sync-operator | ||
source: community-operators | ||
sourceNamespace: openshift-marketplace |
16 changes: 16 additions & 0 deletions
16
cluster-applications/052-group-sync-operator/templates/03-gso_Secret.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,16 @@ | ||
--- | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: isv-group-sync | ||
namespace: group-sync-operator | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "052" | ||
{{- if .Values.custom_labels }} | ||
labels: | ||
{{ .Values.custom_labels | toYaml | indent 4 }} | ||
{{- end }} | ||
type: Opaque | ||
data: | ||
clientId: {{ .Values.group_sync_operator_isv_client_id | b64enc }} | ||
clientSecret: {{ .Values.group_sync_operator_isv_client_secret | b64enc }} |
20 changes: 20 additions & 0 deletions
20
cluster-applications/052-group-sync-operator/templates/04-gso_GroupSync.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: redhatcop.redhat.io/v1alpha1 | ||
kind: GroupSync | ||
metadata: | ||
name: isv-group-sync | ||
namespace: group-sync-operator | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "053" | ||
argocd.argoproj.io/sync-options: "SkipDryRunOnMissingResource=true,Validate=false" | ||
spec: | ||
schedule: "{{ .Values.group_sync_operator_cron_schedule }}" | ||
providers: | ||
- name: ibmsecurityverify | ||
ibmsecurityverify: | ||
credentialsSecret: | ||
name: isv-group-sync | ||
namespace: group-sync-operator | ||
tenantUrl: "{{ .Values.group_sync_operator_isv_tenant_url }}" | ||
groups: | ||
{{ .Values.group_sync_operator_isv_groups | toYaml | indent 10 }} |
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 @@ | ||
--- | ||
group_sync_operator_channel: "alpha" | ||
group_sync_operator_cron_schedule: "*/30 * * * *" # every 30 minutes | ||
group_sync_operator_isv_client_id: xxx | ||
group_sync_operator_isv_client_secret: xxx |
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
70 changes: 70 additions & 0 deletions
70
root-applications/ibm-mas-cluster-root/templates/052-group-sync-operator-app.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,70 @@ | ||
{{- if not (empty .Values.group_sync_operator) }} | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: group-sync-operator.{{ .Values.cluster.id }} | ||
namespace: {{ .Values.argo.namespace }} | ||
labels: | ||
environment: '{{ .Values.account.id }}' | ||
region: '{{ .Values.region.id }}' | ||
cluster: '{{ .Values.cluster.id }}' | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "052" | ||
healthCheckTimeout: "1800" | ||
{{- if and .Values.notifications .Values.notifications.slack_channel_id }} | ||
notifications.argoproj.io/subscribe.on-sync-failed.workspace1: {{ .Values.notifications.slack_channel_id }} | ||
notifications.argoproj.io/subscribe.on-sync-succeeded.workspace1: {{ .Values.notifications.slack_channel_id }} | ||
{{- end }} | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: "{{ .Values.argo.projects.apps }}" | ||
destination: | ||
server: {{ .Values.cluster.url }} | ||
namespace: group-sync-operator | ||
source: | ||
repoURL: "{{ .Values.source.repo_url }}" | ||
path: cluster-applications/052-group-sync-operator | ||
targetRevision: "{{ .Values.source.revision }}" | ||
plugin: | ||
name: {{ .Values.avp.name }} | ||
env: | ||
- name: {{ .Values.avp.values_varname }} | ||
value: | | ||
group_sync_operator_cron_schedule: "{{ .Values.group_sync_operator.cron_schedule }}" | ||
group_sync_operator_isv_tenant_url: "{{ .Values.group_sync_operator.isv_tenant_url }}" | ||
group_sync_operator_isv_client_id: "{{ .Values.group_sync_operator.isv_client_id }}" | ||
group_sync_operator_isv_client_secret: "{{ .Values.group_sync_operator.isv_client_secret }}" | ||
group_sync_operator_isv_groups: {{ .Values.group_sync_operator.isv_groups | toYaml | nindent 14 }} | ||
junitreporter: | ||
reporter_name: "group-sync-operator" | ||
cluster_id: "{{ .Values.cluster.id }}" | ||
devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" | ||
devops_build_number: "{{ .Values.devops.build_number }}" | ||
gitops_version: "{{ .Values.source.revision }}" | ||
{{- if .Values.custom_labels }} | ||
custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} | ||
{{- end }} | ||
- name: ARGOCD_APP_NAME | ||
value: groupsyncoperatorapp | ||
{{- if not (empty .Values.avp.secret) }} | ||
- name: AVP_SECRET | ||
value: {{ .Values.avp.secret }} | ||
{{- end }} | ||
syncPolicy: | ||
automated: | ||
{{- if .Values.auto_delete }} | ||
prune: true | ||
{{- end }} | ||
selfHeal: true | ||
retry: | ||
limit: 20 | ||
syncOptions: | ||
- CreateNamespace=true | ||
managedNamespaceMetadata: | ||
labels: | ||
{{- if .Values.custom_labels }} | ||
{{ .Values.custom_labels | toYaml | indent 8 }} | ||
{{- end }} | ||
{{- end }} |