Skip to content

Commit

Permalink
Fix ci tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Mar 10, 2024
1 parent c835ed4 commit 4b9070a
Show file tree
Hide file tree
Showing 9 changed files with 756 additions and 21 deletions.

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions charts/cluster-auth-manager/templates/k8s/addon.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{{- if not .Values.kubeconfigSecretName }}

{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/placement.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/work-agent/perm.yaml" -}}
{{- $restpl := $.Files.Get "common/work-agent/perm.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/gateway_cluster_role.yaml" -}}
{{- $restpl := $.Files.Get "common/gateway_cluster_role.yaml" }}
{{ tpl $restpl $ }}

{{- end }}
8 changes: 4 additions & 4 deletions charts/cluster-gateway-manager/templates/k8s/addon.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- if not .Values.kubeconfigSecretName }}

{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/placement.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/clustergatewayconfiguration.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustergatewayconfiguration.yaml" }}
{{ tpl $restpl $ }}

{{- end }}
4 changes: 2 additions & 2 deletions charts/cluster-proxy-manager/templates/k8s/addon.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if not .Values.kubeconfigSecretName }}

{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/managedproxyconfiguration.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/managedproxyconfiguration.yaml" }}
{{ tpl $restpl $ }}

{{- end }}
8 changes: 7 additions & 1 deletion charts/fluxcd-manager/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
apiVersion: v1
apiVersion: v2
name: fluxcd-manager
description: Installs FluxCD in managed clusters
type: application
version: v2024.2.25
appVersion: "v0.0.2"
home: https://open-cluster-management.io
sources:
- https://github.com/kluster-manager/installer
maintainers:
- name: appscode
email: [email protected]
8 changes: 4 additions & 4 deletions charts/fluxcd-manager/templates/k8s/addon.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- if not .Values.kubeconfigSecretName }}

{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/fluxcd_config.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/fluxcd_config.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/placement.yaml" }}
{{ tpl $restpl $ }}

{{- end }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- if not .Values.kubeconfigSecretName }}

{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }}
{{ tpl $restpl $ }}
---
{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}}
{{- $restpl := $.Files.Get "common/addon/placement.yaml" }}
{{ tpl $restpl $ }}

{{- end }}
13 changes: 11 additions & 2 deletions hack/scripts/ct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ for dir in charts/*/; do
dir=${dir##*/}
num_files=$(find charts/${dir}/templates -type f | wc -l)
echo $dir
if [ $num_files -le 1 ]; then
if [ $num_files -le 1 ] ||
[[ "$dir" = "cluster-gateway" ]] ||
[[ "$dir" = "cluster-manager-hub" ]] ||
[[ "$dir" = "multicluster-controlplane" ]]; then
make ct CT_COMMAND=lint TEST_CHARTS=charts/$dir
elif [[ "$dir" = "cluster-manager-spoke" ]]; then
kubectl apply -f charts/cluster-manager-spoke/crds
helm install cluster-manager-spoke charts/cluster-manager-spoke \
--set hub.kubeConfig=abc \
--set clusterName=abc \
--dry-run=server
else
ns=app-$(date +%s | head -c 6)
kubectl create ns $ns
kubectl label ns $ns pod-security.kubernetes.io/enforce=restricted
# kubectl label ns $ns pod-security.kubernetes.io/enforce=restricted
make ct TEST_CHARTS=charts/$dir KUBE_NAMESPACE=$ns
kubectl delete ns $ns || true
fi
Expand Down
1 change: 1 addition & 0 deletions hack/scripts/import-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ crd-importer \
--input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml \
--input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml \
--input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/cluster/v1beta2/0000_01_clusters.open-cluster-management.io_managedclustersetbindings.crd.yaml \
--input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml \
--out=./charts/cluster-auth-manager/crds

crd-importer \
Expand Down

0 comments on commit 4b9070a

Please sign in to comment.