Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Fix components guards (#64)
Browse files Browse the repository at this point in the history
* Fix guards on subscriptions leading to them being deleted
  on updates.
* Add guard for DH.
  • Loading branch information
Roming22 authored Mar 21, 2024
1 parent 9201850 commit 1b2c468
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions templates/developer-hub/includes/_configure.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ define "rhtap.developer-hub.configure" }}
{{ if (index .Values "developer-hub") }}
- name: configure-developer-hub
image: "quay.io/codeready-toolchain/oc-client-base:latest"
command:
Expand Down Expand Up @@ -142,4 +143,5 @@

echo
echo "Configuration successful"
{{ end }}
{{ end }}
2 changes: 1 addition & 1 deletion templates/openshift-gitops/subscription.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
{{if eq (len (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" "applications.argoproj.io")) 0}}
{{ if (index .Values "openshift-gitops") }}
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/openshift-pipelines/subscription.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
{{if eq (len (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" "pipelines.tekton.dev")) 0}}
{{ if (index .Values "openshift-pipelines") }}
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
Expand Down
2 changes: 2 additions & 0 deletions test/data/helm-chart/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
echo "Configuration successful"



- name: configure-developer-hub
image: "quay.io/codeready-toolchain/oc-client-base:latest"
command:
Expand Down Expand Up @@ -503,6 +504,7 @@ spec:
echo
echo "Configuration successful"



- name: configure-gitops
image: "quay.io/codeready-toolchain/oc-client-base:latest"
Expand Down

0 comments on commit 1b2c468

Please sign in to comment.