-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Devesh Sharma <[email protected]>
- Loading branch information
Devesh Sharma
committed
Aug 2, 2024
1 parent
d3813b5
commit edf3a58
Showing
15 changed files
with
276 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: azure | ||
version: 1.0.0 |
21 changes: 21 additions & 0 deletions
21
argocd-helm-charts/capi-cluster/charts/azure/templates/AzureCluster.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.selfmangedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureCluster | ||
metadata: | ||
name: {{ .Values.global.clusterName }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
location: {{ .Values.location }} | ||
resourceGroup: {{ .Values.resourceGroup }} | ||
subscriptionID: {{ .Values.subscriptionID }} | ||
networkSpec: | ||
vnet: | ||
name: {{ .Values.global.virtualNetwork.name }} | ||
cidrBlocks: | ||
- {{ .Values.global.virtualNetwork.cidrBlock | toString }} | ||
subnets: | ||
- name: {{ .Values.global.virtualNetwork.subnet.name }} | ||
role: node | ||
cidrBlocks: | ||
- {{ .Values.global.virtualNetwork.subnet.cidrBlock | toString }} | ||
{{- end }} |
18 changes: 18 additions & 0 deletions
18
argocd-helm-charts/capi-cluster/charts/azure/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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureClusterIdentity | ||
metadata: | ||
labels: | ||
clusterctl.cluster.x-k8s.io/move-hierarchy: "true" | ||
name: {{ .Values.global.clusterName }}-cluster-identity | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
allowedNamespaces: | ||
list: | ||
- {{ .Release.Namespace }} | ||
clientID: {{ .Values.global.clientID}} | ||
clientSecret: | ||
name: {{ .Values.global.clientSecret}} | ||
namespace: {{ .Release.Namespace }} | ||
tenantID: {{ .Values.global.tenantID }} | ||
type: ServicePrincipal | ||
|
25 changes: 25 additions & 0 deletions
25
argocd-helm-charts/capi-cluster/charts/azure/templates/AzureMachinePool.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{- if .Values.selfmangedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachinePool | ||
metadata: | ||
name: spool1 | ||
namespace: {{ .Values.metadata.namespace }} | ||
spec: | ||
location: {{ .Values.location }} | ||
template: | ||
osDisk: | ||
diskSizeGB: {{ .Values.systemPool.osDiskSizeGB }} | ||
managedDisk: | ||
storageAccountType: Standard_LRS | ||
vmSize: {{ .Values.systemPool.sku }} | ||
sshPublicKey: {{ .Values.sshPublicKey | b64enc }} | ||
strategy: | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
additionalTags: | ||
{{- with .Values.additionalTags }} | ||
{{ toYaml . | indent 6 }} | ||
{{- end }} | ||
{{- end }} |
7 changes: 7 additions & 0 deletions
7
argocd-helm-charts/capi-cluster/charts/azure/templates/AzureManagedCluster.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedCluster | ||
metadata: | ||
name: {{ .Values.global.clusterName }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
36 changes: 36 additions & 0 deletions
36
argocd-helm-charts/capi-cluster/charts/azure/templates/AzureManagedControlPlane.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedControlPlane | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-control-plane | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
location: {{ .Values.location }} | ||
resourceGroupName: {{ .Values.resourceGroupName }} | ||
sshPublicKey: {{ .Values.sshPublicKey | b64enc }} | ||
subscriptionID: {{ .Values.subscriptionID }} | ||
version: {{ .Values.global.kubernetes.version }} | ||
networkPolicy: {{ .Values.global.networkPolicy }} #azure # or calico | ||
networkPlugin: {{ .Values.global.networkPlugin }} #azure # or kubenet | ||
sku: | ||
tier: {{ .Values.global.skuTier }} #Free # or Standard | ||
{{- if .Values.global.addonProfiles }} | ||
addonProfiles: | ||
{{- range $profile := .Values.global.addonProfiles }} | ||
- name: {{ $profile.name }} | ||
enabled: {{ $profile.enabled }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.global.virtualNetwork }} | ||
virtualNetwork: | ||
name: {{ .Values.global.virtualNetwork.name }} | ||
cidrBlock: {{ .Values.global.virtualNetwork.cidrBlock | toString }} | ||
resourceGroup: {{ .Values.resourceGroupName }} | ||
subnet: | ||
name: {{ .Values.global.virtualNetwork.subnet.name }} | ||
cidrBlock: {{ .Values.global.virtualNetwork.subnet.cidrBlock | toString }} | ||
{{- end }} | ||
identityRef: | ||
name: {{ .Values.global.clusterName }}-cluster-identity | ||
kind: AzureClusterIdentity | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
argocd-helm-charts/capi-cluster/charts/azure/templates/SystemMachinePool.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachinePool | ||
metadata: | ||
name: {{ .Values.global.clusterName}}-systempool | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
replicas: {{ .Values.systemPool.replicas }} | ||
template: | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedMachinePool | ||
name: mspool01 | ||
namespace: {{ .Release.Namespace }} | ||
version: {{ .Values.global.kubernetes.version }} | ||
bootstrap: | ||
dataSecretName: {{ .Values.global.clientSecret}} |
10 changes: 10 additions & 0 deletions
10
argocd-helm-charts/capi-cluster/charts/azure/templates/SystemManagedMachiePool.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedMachinePool | ||
metadata: | ||
name: mspool01 | ||
spec: | ||
mode: System | ||
osDiskSizeGB: {{ .Values.systemPool.osDiskSizeGB }} | ||
sku: {{ .Values.systemPool.sku }} | ||
{{- end }} |
21 changes: 21 additions & 0 deletions
21
argocd-helm-charts/capi-cluster/charts/azure/templates/UserMachinePool.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachinePool | ||
metadata: | ||
name: {{ .Values.global.clusterName}}-userpool | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
replicas: {{ .Values.userPool.replicas }} | ||
template: | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedMachinePool | ||
name: mupool01 | ||
namespace: {{ .Release.Namespace }} | ||
version: {{ .Values.global.kubernetes.version }} | ||
bootstrap: | ||
dataSecretName: {{ .Values.global.clientSecret}} | ||
{{- end }} |
10 changes: 10 additions & 0 deletions
10
argocd-helm-charts/capi-cluster/charts/azure/templates/UserManagedMachinePool.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedMachinePool | ||
metadata: | ||
name: mupool01 | ||
spec: | ||
mode: User | ||
osDiskSizeGB: {{ .Values.userPool.osDiskSizeGB }} | ||
sku: {{ .Values.userPool.sku }} | ||
{{- end }} |
22 changes: 22 additions & 0 deletions
22
argocd-helm-charts/capi-cluster/charts/azure/templates/cluster.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: {{ .Values.global.clusterName }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterNetwork: | ||
services: | ||
cidrBlocks: | ||
- {{ .Values.global.clusterNetwork.services.cidrBlocks }} | ||
controlPlaneRef: | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedControlPlane | ||
name: {{ .Values.global.clusterName }}-control-plane | ||
{{- end }} | ||
infrastructureRef: | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedCluster | ||
name: {{ .Values.global.clusterName }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
global: | ||
clusterName: my-cluster | ||
kubernetes: | ||
version: "1.29.2" | ||
networkPolicy: azure # or calico | ||
networkPlugin: azure # or kubenet | ||
skuTier: Free | ||
clientSecret: mysecret | ||
clientID: 158ac5a8-c34d-4d35-81ff-90677ce31b5d | ||
tenantID: 3964984e-eaaf-4ac4-b3ff-b3cda81256ff | ||
addonProfiles: | ||
- name: azureKeyvaultSecretsProvider | ||
enabled: true | ||
- name: azurepolicy | ||
enabled: true | ||
clusterNetwork: | ||
services: | ||
cidrBlocks: "192.168.0.0/16" | ||
virtualNetwork: | ||
name: controlplan-vnet | ||
cidrBlock: "10.1.0.0/16" | ||
subnet: | ||
name: controlplan-subnet | ||
cidrBlock: "10.1.1.0/24" | ||
|
||
managedCluster: true | ||
selfManagedCluster: false | ||
|
||
systemPool: | ||
osDiskSizeGB: 30 | ||
sku: Standard_D2s_v3 | ||
replica: 1 | ||
|
||
userPool: | ||
osDiskSizeGB: 30 | ||
sku: Standard_D2s_v3 | ||
replica: 1 | ||
|
||
location: centralindia | ||
resourceGroupName: cluster-api | ||
sshPublicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrRKqLY7bihiRdr8uJnTMcfDMeQ9HOUxYHp7jBbl+Paae2nJ8tzbSGbMk9+Wqw8i5C38rlUolq6Sc1xUUDzWCXB8LCVSsIUrpWUsy5tjlq6U9r8NpypSIon48tNrLdEwtYEf1/5bYA0Y2PFTxtkZcvWtqcor7q9hiejQWrNU3CCVAt8kBGzsieT00YwCrI6AvT+Ko8xjJyDFuunIpliYjyotgXXFF2BohxKEdkuIVpS7iUGQxF993tKQNaMtkKnuU9ijLFhdp41Rk8lSCc1x+oavUbR+ACtbZwlYnc7lcOAJUP3HEQ6ewR5W1zuASlRyR5Mr9sJ0vGf7zbkTAk3VGRlGRVXyU+rZUkqGm71LyKBkptxv32MD/HGbnE81KeJXm7tvLJvr96ssOn3AuBiPEppNAhtqN7Xo/7aYOfkaBxYpddJQ9uhAXdmVTRNnQuRIJK4vWI1o5urJ+1VJ1WawX6QdFOc+3Wbi2JGeyxtweYGIFjcwqkD3gbWtoSb4XLKHE= davesh.sharma@LM2RTXP4K9" | ||
subscriptionID: cce2e9ac-1580-4d82-b79f-a637f5f3e443 | ||
additionalTags: | ||
environment: dev |
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,22 @@ | ||
{{- if (.Values.provider).azure }} | ||
apiVersion: addons.cluster.x-k8s.io/v1alpha1 | ||
kind: HelmChartProxy | ||
metadata: | ||
name: ccm-azure-{{ .Values.global.clusterName }} | ||
spec: | ||
clusterSelector: | ||
matchLabels: | ||
cluster.x-k8s.io/name: {{ .Values.global.clusterName }} | ||
repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo | ||
chartName: cloud-provider-azure | ||
namespace: kube-system | ||
releaseName: cloud-provider-azure | ||
version: 1.30.3 | ||
options: | ||
waitForJobs: true | ||
wait: true | ||
timeout: 5m0s | ||
valuesTemplate: | | ||
infra: | ||
clusterName: {{ .Values.global.clusterName }} | ||
{{- 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
16 changes: 16 additions & 0 deletions
16
argocd-helm-charts/capi-cluster/templates/provider-azure.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if (.Values.provider).azure }} | ||
# Need to work on this, not completed | ||
apiVersion: operator.cluster.x-k8s.io/v1alpha2 | ||
kind: InfrastructureProvider | ||
metadata: | ||
name: azure-{{ .Values.global.customerid }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
version: {{ .Values.global.capz.version }} | ||
fetchConfig: | ||
url: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/{{ .Values.global.capz.version }}/infrastructure-components.yaml | ||
manager: | ||
metrics: | ||
bindAddress: ":8443" | ||
syncPeriod: 10m0s | ||
{{- end }} |