Skip to content

Commit

Permalink
Revise cluster-gateway charts
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Mar 9, 2024
1 parent a9166ab commit f4aa43f
Show file tree
Hide file tree
Showing 36 changed files with 2,014 additions and 282 deletions.
12 changes: 10 additions & 2 deletions charts/cluster-auth-manager/common/gateway_cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ kind: ClusterRole
metadata:
name: open-cluster-management:cluster-gateway:proxy
rules:
- apiGroups:
- gateway.open-cluster-management.io
resources:
- clustergateways
verbs: ["get", "list", "watch"]
- apiGroups:
- gateway.open-cluster-management.io
resources:
- clustergateways/health
verbs: ["get"]
- apiGroups:
- gateway.open-cluster-management.io
resources:
- clustergateways/proxy
verbs:
- "*"
verbs: ["*"]
40 changes: 25 additions & 15 deletions charts/cluster-gateway-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$ helm repo add appscode https://charts.appscode.com/stable
$ helm repo update
$ helm search repo appscode/cluster-gateway-manager --version=v2024.2.25
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management --create-namespace --version=v2024.2.25
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management-cluster-gateway --create-namespace --version=v2024.2.25
```

## Introduction
Expand All @@ -24,7 +24,7 @@ This chart deploys a cluster-gateway-manager on a [Kubernetes](http://kubernetes
To install/upgrade the chart with the release name `cluster-gateway-manager`:

```bash
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management --create-namespace --version=v2024.2.25
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management-cluster-gateway --create-namespace --version=v2024.2.25
```

The command deploys a cluster-gateway-manager on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand All @@ -36,7 +36,7 @@ The command deploys a cluster-gateway-manager on the Kubernetes cluster in the d
To uninstall the `cluster-gateway-manager`:

```bash
$ helm uninstall cluster-gateway-manager -n open-cluster-management
$ helm uninstall cluster-gateway-manager -n open-cluster-management-cluster-gateway
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
Expand All @@ -45,27 +45,37 @@ The command removes all the Kubernetes components associated with the chart and

The following table lists the configurable parameters of the `cluster-gateway-manager` chart and their default values.

| Parameter | Description | Default |
|---------------------------------|----------------------------------------|--------------------------------------------------|
| image | Image of the cluster-gateway instances | <code>oamdev/cluster-gateway-manager</code> |
| tag | | <code></code> |
| clusterGateway.image | | <code>oamdev/cluster-gateway</code> |
| clusterGateway.installNamespace | | <code>vela-system</code> |
| clusterGateway.secretNamespace | | <code>open-cluster-management-credentials</code> |
| replicas | Number of replicas | <code>1</code> |
| manualSecretManagement | | <code>true</code> |
| konnectivityEgress | | <code>false</code> |
| Parameter | Description | Default |
|--------------------------------------------------|----------------------------------------|-------------------------------------------------------------------|
| nameOverride | | <code>""</code> |
| fullnameOverride | | <code>""</code> |
| image | Image of the cluster-gateway instances | <code>ghcr.io/kluster-manager/cluster-gateway-manager</code> |
| tag | | <code>latest</code> |
| clusterGateway.image | | <code>ghcr.io/kluster-manager/cluster-gateway</code> |
| replicas | Number of replicas | <code>1</code> |
| manualSecretManagement | | <code>false</code> |
| clusterProxy.enabled | | <code>true</code> |
| clusterProxy.proxyServerHost | | <code>"proxy-entrypoint.open-cluster-management-addon.svc"</code> |
| clusterProxy.proxyServerPort | | <code>8090</code> |
| clusterProxy.credentials.namespace | | <code>open-cluster-management-addon</code> |
| clusterProxy.credentials.proxyClientCASecretName | | <code>proxy-server-ca</code> |
| clusterProxy.credentials.proxyClientSecretName | | <code>proxy-client</code> |
| kubeconfigSecretName | | <code>""</code> |
| addonManagerNamespace | | <code>open-cluster-management-cluster-gateway</code> |
| placement.create | | <code>true</code> |
| placement.name | | <code>global</code> |
| kubectl.image | | <code>ghcr.io/appscode/kubectl-nonroot:1.25</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management --create-namespace --version=v2024.2.25 --set image=oamdev/cluster-gateway-manager
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management-cluster-gateway --create-namespace --version=v2024.2.25 --set image=ghcr.io/kluster-manager/cluster-gateway-manager
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management --create-namespace --version=v2024.2.25 --values values.yaml
$ helm upgrade -i cluster-gateway-manager appscode/cluster-gateway-manager -n open-cluster-management-cluster-gateway --create-namespace --version=v2024.2.25 --values values.yaml
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: config.gateway.open-cluster-management.io/v1alpha1
kind: ClusterGatewayConfiguration
metadata:
name: cluster-gateway
spec:
image: {{ .Values.clusterGateway.image }}:{{ .Values.tag | default .Chart.AppVersion }}
secretManagement:
{{ if .Values.manualSecretManagement }}
type: Manual
{{ else }}
type: ManagedServiceAccount
managedServiceAccount:
name: cluster-gateway
{{ end }}
egress:
{{- if .Values.clusterProxy.enabled }}
clusterProxy:
{{- omit .Values.clusterProxy "enabled" | toYaml | nindent 6 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: cluster-gateway
annotations:
addon.open-cluster-management.io/lifecycle: "addon-manager"
spec:
addOnMeta:
displayName: {{ .Chart.Name }}
description: {{ .Chart.Description }}
installStrategy:
type: Placements
placements:
- name: {{ .Values.placement.name }}
namespace: {{ include "cluster-gateway-manager.namespace" . }}
supportedConfigs:
- group: config.gateway.open-cluster-management.io
resource: clustergatewayconfigurations
defaultConfig:
name: cluster-gateway
11 changes: 11 additions & 0 deletions charts/cluster-gateway-manager/common/addon/clustersetbinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.placement.create }}

apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
name: global
namespace: {{ include "cluster-gateway-manager.namespace" . }}
spec:
clusterSet: global

{{- end }}
12 changes: 12 additions & 0 deletions charts/cluster-gateway-manager/common/addon/placement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.placement.create }}

apiVersion: cluster.open-cluster-management.io/v1beta1
kind: Placement
metadata:
name: {{ .Values.placement.name }}
namespace: {{ include "cluster-gateway-manager.namespace" . }}
spec:
clusterSets:
- global

{{- end }}
Loading

0 comments on commit f4aa43f

Please sign in to comment.