diff --git a/charts/cf-vcluster/Chart.yaml b/charts/cf-vcluster/Chart.yaml index 05e03d3..44bc731 100644 --- a/charts/cf-vcluster/Chart.yaml +++ b/charts/cf-vcluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cf-vcluster description: Umbrella chart over vCluster adjusted for Codefresh use cases - mainly in Crossplane compositions type: application -version: 0.28.0-0 +version: 0.28.0-1 appVersion: "0.28.0" dependencies: - name: vcluster diff --git a/charts/cf-vcluster/README.md b/charts/cf-vcluster/README.md index 1441576..2065499 100644 --- a/charts/cf-vcluster/README.md +++ b/charts/cf-vcluster/README.md @@ -1,6 +1,6 @@ # cf-vcluster -![Version: 0.28.0-0](https://img.shields.io/badge/Version-0.28.0--0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.28.0](https://img.shields.io/badge/AppVersion-0.28.0-informational?style=flat-square) +![Version: 0.28.0-1](https://img.shields.io/badge/Version-0.28.0--1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.28.0](https://img.shields.io/badge/AppVersion-0.28.0-informational?style=flat-square) Umbrella chart over vCluster adjusted for Codefresh use cases - mainly in Crossplane compositions @@ -45,6 +45,8 @@ Umbrella chart over vCluster adjusted for Codefresh use cases - mainly in Crossp | vcluster.controlPlane.proxy.extraSANs[1] | string | `"{{ tpl (printf \"%s.%s\" .Values.global.ingress.internal.host.name .Values.global.ingress.internal.host.domain) . }}"` | | | vcluster.controlPlane.proxy.extraSANs[2] | string | `"{{ tpl (printf \"%s.%s\" .Values.global.ingress.public.host.name .Values.global.ingress.public.host.domain) . }}"` | | | vcluster.experimental.deploy.vcluster.manifests | string | `"---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n name: oidc-cluster-admin\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: Group\n name: rnd@codefresh.io\n---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n name: oidc-cluster-admin-octopus\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: Group\n name: 787d1a9a-e488-4a77-bb6c-f4b2fdfd8cea # Codefresh R&D Team\n- kind: Group\n name: 607a9f67-422c-4ca2-b8c4-d0be213b9650 # Codefresh SA Team\n- kind: Group\n name: f8de82e2-cdb6-480a-8f37-9f958ea5fef5 # Codefresh Support Team\n- kind: Group\n name: 16b3fb37-58f2-4786-8ca8-6f58d0410687 # Codefresh OSS Team\n- kind: Group\n name: dc35779f-57d5-4dff-90c0-34c6e93fe7e7 # Codefresh OSS Team\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: codefresh-pipelines-integration-cluster-admin\n namespace: kube-system\n---\napiVersion: v1\nkind: Secret\nmetadata:\n name: codefresh-pipelines-integration-cluster-admin-token\n namespace: kube-system\n annotations:\n kubernetes.io/service-account.name: codefresh-pipelines-integration-cluster-admin\ntype: kubernetes.io/service-account-token\n---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n name: codefresh-pipelines-integration-cluster-admin\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: ServiceAccount\n name: codefresh-pipelines-integration-cluster-admin\n namespace: kube-system"` | | +| vcluster.exportKubeConfig.insecure | bool | `true` | | +| vcluster.exportKubeConfig.server | string | `"{{- include \"cf-vcluster.kubeconfighost\" . -}}"` | Automatically calculate and set the kubeconfig host value based on ingress settings | | vcluster.rbac.clusterRole.enabled | bool | `true` | | | vcluster.sync.fromHost.ingressClasses.enabled | bool | `true` | | | vcluster.sync.fromHost.nodes.enabled | bool | `true` | | diff --git a/charts/cf-vcluster/templates/_cf_helpers.tpl b/charts/cf-vcluster/templates/_cf_helpers.tpl new file mode 100644 index 0000000..60e79d9 --- /dev/null +++ b/charts/cf-vcluster/templates/_cf_helpers.tpl @@ -0,0 +1,9 @@ +{{- define "cf-vcluster.kubeconfighost" -}} + {{ if .Values.global.ingress.public.enabled -}} + {{- tpl (printf "%s.%s" .Values.global.ingress.public.host.name .Values.global.ingress.public.host.domain ) . -}} + {{- else if .Values.global.ingress.internal.enabled }} + {{- tpl (printf "%s.%s" .Values.global.ingress.internal.host.name .Values.global.ingress.internal.host.domain) . -}} + {{- else -}} + {{- printf "%s.%s.svc.cluster.local" .Release.Name .Release.Namespace -}} + {{- end -}} +{{- end -}} diff --git a/charts/cf-vcluster/values.yaml b/charts/cf-vcluster/values.yaml index b991654..48541c0 100644 --- a/charts/cf-vcluster/values.yaml +++ b/charts/cf-vcluster/values.yaml @@ -32,6 +32,10 @@ global: domain: example.com vcluster: + exportKubeConfig: + # -- Automatically calculate and set the kubeconfig host value based on ingress settings + server: "{{- include \"cf-vcluster.kubeconfighost\" . -}}" + insecure: true controlPlane: proxy: extraSANs: