generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README and fix resource group name default (#12)
- Loading branch information
Showing
6 changed files
with
82 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ type: application | |
maintainers: | ||
- email: [email protected] | ||
name: Jont828 | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
appVersion: 1.16.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Cluster API Provider Azure Managed Cluster Helm Chart | ||
|
||
This Helm chart is used to deploy a CAPZ Managed Cluster to a Cluster API Management Cluster. | ||
|
||
## 1. Prerequisites | ||
|
||
Create a Kubernetes cluster with a resource like kind and install the Cluster API Provider Azure (CAPZ) components with | ||
|
||
```bash | ||
clusterctl init --infrastructure azure | ||
``` | ||
|
||
## 2. Add the repo for the CAPZ Managed Cluster Helm Chart | ||
|
||
```bash | ||
helm repo add capi https://mboersma.github.io/cluster-api-charts | ||
``` | ||
|
||
## 3. Specify values for the CAPZ Managed Cluster Helm Chart | ||
|
||
Create a `values.yaml` to specify credentials and other values for the CAPZ Managed Cluster Helm Chart. It can look like the following: | ||
|
||
```yaml | ||
subscriptionID: <subscription-id> | ||
identity: | ||
clientID: <client-id> | ||
tenantID: <tenant-id> | ||
type: WorkloadIdentity | ||
cluster: | ||
location: eastus | ||
cidrBlocks: | ||
- 192.168.0.0/16 | ||
controlplane: | ||
sshPublicKey: <ssh-public-key> | ||
networkPolicy: "calico" | ||
networkPlugin: "kubenet" | ||
networkPluginMode: null | ||
|
||
``` | ||
## 4. Install the CAPZ Managed Cluster Helm Chart | ||
```bash | ||
helm install <name> capi/azure-managed-cluster -f values.yaml | ||
``` | ||
|
||
## 5. Uninstall the CAPZ Managed Cluster Helm Chart | ||
|
||
```bash | ||
helm uninstall <name> | ||
``` | ||
|
||
**Note:** Uninstall currently is bugged as it fails with `Error: failed to delete release`. | ||
|
||
**Note:** the AzureClusterIdentity and cluster identity secret are not deleted when the chart is uninstalled since deleting them would remove the credentials needed to delete the Azure resources. |
20 changes: 10 additions & 10 deletions
20
charts/azure-managed-cluster/templates/azureclusteridentity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
{{- if not (lookup "infrastructure.cluster.x-k8s.io/v1beta1" "AzureClusterIdentity" .Values.identity.clusterIdentityNamespace .Values.identity.clusterIdentityName) }} | ||
{{- if not (lookup "infrastructure.cluster.x-k8s.io/v1beta1" "AzureClusterIdentity" .Release.Namespace .Values.identity.clusterIdentityName) }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureClusterIdentity | ||
metadata: | ||
labels: | ||
clusterctl.cluster.x-k8s.io/move-hierarchy: "true" | ||
annotations: | ||
helm.sh/resource-policy: keep | ||
name: {{ $.Values.identity.clusterIdentityName }} | ||
name: {{ .Values.identity.clusterIdentityName }} | ||
spec: | ||
allowedNamespaces: | ||
list: | ||
- {{ $.Values.identity.clusterIdentitySecretNamespace }} | ||
- {{ .Release.Namespace }} | ||
clientSecret: | ||
name: {{ $.Values.identity.clusterIdentitySecretName }} | ||
namespace: {{ $.Values.identity.clusterIdentitySecretNamespace }} | ||
clientID: {{ $.Values.identity.clientID }} | ||
tenantID: {{ $.Values.identity.tenantID }} | ||
type: {{ $.Values.identity.type }} | ||
resourceID: {{ $.Values.identity.resourceID }} | ||
{{- end }} | ||
name: {{ .Values.identity.clusterIdentitySecretName }} | ||
namespace: {{ .Release.Namespace }} | ||
clientID: {{ .Values.identity.clientID }} | ||
tenantID: {{ .Values.identity.tenantID }} | ||
type: {{ .Values.identity.type }} | ||
resourceID: {{ .Values.identity.resourceID }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{{- if .Values.identity.clusterIdentitySecretValueB64 }} | ||
{{- if .Values.identity.clusterIdentitySecretValue }} | ||
{{- if not (lookup "v1" "Secret" .Release.Namespace .Values.identity.clusterIdentitySecretName) }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ $.Values.identity.clusterIdentitySecretName }} | ||
namespace: {{ $.Values.identity.clusterIdentitySecretNamespace }} | ||
name: {{ .Values.identity.clusterIdentitySecretName }} | ||
annotations: | ||
clusterctl.cluster.x-k8s.io/move-hierarchy: "true" | ||
helm.sh/resource-policy: keep | ||
type: Opaque | ||
data: | ||
clientSecret: {{ $.Values.identity.clusterIdentitySecretValueB64 }} | ||
clientSecret: {{ .Values.identity.clusterIdentitySecretValue | b64enc}} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters