-
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 27, 2024
1 parent
7c970c3
commit 9b9dedf
Showing
18 changed files
with
442 additions
and
43 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
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,41 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
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 }} | ||
identityRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureClusterIdentity | ||
name: {{ .Values.global.clusterName }}-cluster-identity | ||
bastionSpec: | ||
azureBastion: | ||
enableTunneling: true | ||
name: bastion | ||
publicIP: | ||
name: bastion | ||
sku: Standard | ||
subnet: | ||
name: AzureBastionSubnet | ||
|
||
networkSpec: | ||
apiServerLB: | ||
type: {{ .Values.selfManagedCluster.apiLoadbalancer }} | ||
vnet: | ||
name: {{ .Values.global.virtualNetwork.name }} | ||
{{- if ne .Values.global.virtualNetwork.cidrBlock "" }} | ||
cidrBlocks: | ||
- {{ .Values.global.virtualNetwork.cidrBlock | toString }} | ||
{{- end }} | ||
subnets: | ||
- name: {{ .Values.global.virtualNetwork.subnet.name }} | ||
role: node | ||
{{- if ne .Values.global.virtualNetwork.subnet.cidrBlock "" }} | ||
cidrBlocks: | ||
- {{ .Values.global.virtualNetwork.subnet.cidrBlock | toString }} | ||
{{- 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
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.selfManagedCluster.enabled }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachinePool | ||
metadata: | ||
name: spool1 | ||
namespace: {{ .Release.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 }} |
32 changes: 32 additions & 0 deletions
32
argocd-helm-charts/capi-cluster/charts/azure/templates/AzureMachineTemplate.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,32 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-system | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
template: | ||
spec: | ||
vmSize: {{ .Values.systemPool.sku }} | ||
osDisk: | ||
diskSizeGB: {{ .Values.systemPool.osDiskSizeGB }} | ||
osType: Linux | ||
sshPublicKey: {{ .Values.sshPublicKey | b64enc }} | ||
{{- end }} | ||
--- | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-user | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
template: | ||
spec: | ||
vmSize: {{ .Values.userPool.sku }} | ||
osDisk: | ||
diskSizeGB: {{ .Values.userPool.osDiskSizeGB }} | ||
osType: Linux | ||
sshPublicKey: {{ .Values.sshPublicKey | b64enc }} | ||
{{- end }} | ||
--- |
2 changes: 2 additions & 0 deletions
2
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{{- if .Values.managedCluster }} | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedCluster | ||
metadata: | ||
name: {{ .Values.global.clusterName }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- 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
80 changes: 80 additions & 0 deletions
80
argocd-helm-charts/capi-cluster/charts/azure/templates/MachineDeployment.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,80 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
replicas: 1 | ||
selector: | ||
matchLabels: null | ||
template: | ||
spec: | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ .Values.global.clusterName }}-system | ||
version: {{ .Values.global.kubernetes.version }} | ||
failureDomain: "1" | ||
{{- end }} | ||
--- | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-md-1 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
replicas: 1 | ||
selector: | ||
matchLabels: null | ||
template: | ||
spec: | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ .Values.global.clusterName }}-system | ||
version: {{ .Values.global.kubernetes.version }} | ||
failureDomain: "2" | ||
{{- end }} | ||
--- | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-md-2 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
replicas: 1 | ||
selector: | ||
matchLabels: null | ||
template: | ||
spec: | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ .Values.global.clusterName }}-system | ||
version: {{ .Values.global.kubernetes.version }} | ||
failureDomain: "3" | ||
{{- end }} |
59 changes: 59 additions & 0 deletions
59
argocd-helm-charts/capi-cluster/charts/azure/templates/SelfSystemMachinePool.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,59 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachinePool | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: {{ .Values.global.clusterName }} | ||
name: {{ .Values.global.clusterName }}-vmu-0 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
failureDomains: | ||
- "1" | ||
- "3" | ||
replicas: 3 | ||
template: | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachinePool | ||
name: spool1 | ||
version: {{ .Values.global.kubernetes.version }} | ||
{{- end }} | ||
--- | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachinePool | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: {{ .Values.global.clusterName }} | ||
name: {{ .Values.global.clusterName }}-vmus-0 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
failureDomains: | ||
- "1" | ||
- "3" | ||
replicas: 3 | ||
template: | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachinePool | ||
name: spool1 | ||
version: {{ .Values.global.kubernetes.version }} | ||
{{- end }} |
29 changes: 29 additions & 0 deletions
29
argocd-helm-charts/capi-cluster/charts/azure/templates/SelfUserMachinePool.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,29 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachinePool | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: {{ .Values.global.clusterName }} | ||
name: {{ .Values.global.clusterName }}-vmu-0 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
failureDomains: | ||
- "1" | ||
- "3" | ||
replicas: 3 | ||
template: | ||
spec: | ||
clusterName: {{ .Values.global.clusterName }} | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
clusterName: {{ .Values.global.clusterName }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ .Values.global.clusterName }}-user | ||
version: {{ .Values.global.kubernetes.version }} | ||
{{- 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
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
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
23 changes: 23 additions & 0 deletions
23
argocd-helm-charts/capi-cluster/charts/azure/templates/kubeadmConfigTemplate.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,23 @@ | ||
{{- if .Values.selfManagedCluster.enabled }} | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: {{ .Values.global.clusterName }}-md-0 | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
template: | ||
spec: | ||
files: | ||
- contentFrom: | ||
secret: | ||
key: sp.json | ||
name: {{ .Values.selfManagedCluster.clientSecret.workerNodeAzure }} | ||
owner: root:root | ||
path: /etc/kubernetes/azure.json | ||
permissions: "0644" | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
name: {{ .Values.selfManagedCluster.localHostname }} | ||
{{- end }} |
Oops, something went wrong.