Skip to content

Commit

Permalink
add new kustomization e2e test yamls
Browse files Browse the repository at this point in the history
Signed-off-by: Xiangjing Li <xiangli@redhat.com>
  • Loading branch information
xiangjingli committed Jul 8, 2024
1 parent 5aeb0f3 commit 0af0407
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/github/kustomizeLabels/base/KlusterletAddonConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
apiVersion: agent.open-cluster-management.io/v1
kind: KlusterletAddonConfig
metadata:
name: REPLACED BY KUSTOMIZE
namespace: REPLACED BY KUSTOMIZE
spec:
clusterName: REPLACED BY KUSTOMIZE
clusterNamespace: REPLACED BY KUSTOMIZE
applicationManager:
enabled: true
certPolicyController:
enabled: true
clusterLabels:
cloud: auto-detect
vendor: auto-detect
iamPolicyController:
enabled: true
policyController:
enabled: true
searchCollector:
enabled: true
version: 2.2.0
10 changes: 10 additions & 0 deletions test/github/kustomizeLabels/base/ManagedCluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: cluster.open-cluster-management.io/v1
kind: ManagedCluster
metadata:
name: REPLACED BY KUSTOMIZE
namespace: REPLACED BY KUSTOMIZE
labels: #LABELS ADDED BY KUSTOMIZE

spec:
hubAcceptsClient: true
7 changes: 7 additions & 0 deletions test/github/kustomizeLabels/base/Namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
kind: Namespace
apiVersion: v1
metadata:
name: REPLACED BY KUSTOMIZE
labels:
#cluster.open-cluster-management.io/managedCluster:
7 changes: 7 additions & 0 deletions test/github/kustomizeLabels/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- KlusterletAddonConfig.yaml
- ManagedCluster.yaml
- Namespace.yaml
42 changes: 42 additions & 0 deletions test/github/kustomizeLabels/namctigtd27d/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resources:
- ../base

patches:
- target:
kind: KlusterletAddonConfig
patch: |
- op: replace
path: /metadata/name
value: "namctigtd27d"
- op: replace
path: /metadata/namespace
value: "namctigtd27d"
- op: replace
path: /spec/clusterName
value: "namctigtd27d"
- op: replace
path: /spec/clusterNamespace
value: "namctigtd27d"
- target:
kind: ManagedCluster
patch: |
- op: replace
path: /metadata/name
value: "namctigtd27d"
- op: replace
path: /metadata/namespace
value: "namctigtd27d"
- op: add
path: /metadata/labels
value:
environment: dev
test1: test1
test2: test2
vault-csi-provider-enabled: true
- target:
kind: Namespace
patch: |
- op: replace
path: /metadata/name
value: "namctigtd27d"

0 comments on commit 0af0407

Please sign in to comment.