Skip to content

Commit

Permalink
Template fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Sep 19, 2023
1 parent cc018ce commit 74143d7
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 382 deletions.
2 changes: 1 addition & 1 deletion templates/cluster-template-aks-clusterclass.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions templates/cluster-template-aks.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/cluster-template-clusterclass-cluster.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions templates/flavors/aks-clusterclass-cluster/cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# The Cluster object is the top level owner of all resources.
# It coordinates between the control plane and the infrastructure/machines.
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
clusterNetwork:
services:
pods:
cidrBlocks:
- 192.168.0.0/16
controlPlaneRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedControlPlane
name: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedCluster
name: ${CLUSTER_NAME}
topology:
class: default
version: ${KUBERNETES_VERSION}
workers:
machinePools:
- class: default-system
name: mp-0
replicas: 1
- class: default-worker
name: mp-1
replicas: 1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ kind: AzureManagedClusterTemplate
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
template:
spec: {}

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedMachinePoolTemplate
metadata:
name: ${CLUSTER_NAME}-pool0
namespace: default
spec:
template:
spec:
mode: System
name: pool0
sku: ${AZURE_NODE_MACHINE_TYPE}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedMachinePoolTemplate
metadata:
name: ${CLUSTER_NAME}-pool1
namespace: default
spec:
template:
spec:
mode: User
name: pool1
sku: ${AZURE_NODE_MACHINE_TYPE}
21 changes: 0 additions & 21 deletions templates/flavors/aks-clusterclass/cluster.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions templates/flavors/aks-clusterclass/kubeadm-config-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: ${CLUSTER_NAME}-pool0
namespace: default
spec:
template:
spec:
files:
- contentFrom:
secret:
key: worker-node-azure.json
name: replace_me
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
azure-container-registry-config: /etc/kubernetes/azure.json
cloud-provider: external
name: '{{ ds.meta_data["local_hostname"] }}'
preKubeadmCommands: []
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: ${CLUSTER_NAME}-pool1
namespace: default
spec:
template:
spec:
files:
- contentFrom:
secret:
key: worker-node-azure.json
name: replace_me
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
azure-container-registry-config: /etc/kubernetes/azure.json
cloud-provider: external
name: '{{ ds.meta_data["local_hostname"] }}'
preKubeadmCommands: []
7 changes: 2 additions & 5 deletions templates/flavors/aks-clusterclass/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ kind: Kustomization
namespace: default
resources:
- clusterclass.yaml
- cluster.yaml
- azure-managed-controlplane-template.yaml
- azure-managed-cluster-template.yaml
- ../aks/machinepool.yaml
- ../aks/azure-managed-machinepool.yaml
- azure-managed-machinepool-template.yaml
- ../../azure-cluster-identity
patchesStrategicMerge:
- patches/managedazurecluster-identity-ref.yaml
- kubeadm-config-template.yaml
File renamed without changes.
3 changes: 3 additions & 0 deletions templates/flavors/clusterclass-cluster/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace: default
resources:
- cluster.yaml
1 change: 0 additions & 1 deletion templates/flavors/clusterclass/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace: default
resources:
- clusterclass.yaml
- cluster.yaml
- azure-cluster-template.yaml
- azure-machine-template-controlplane.yaml
- azure-machine-template-worker.yaml
Expand Down
19 changes: 0 additions & 19 deletions templates/test/ci/cluster-template-prow-aks.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 74143d7

Please sign in to comment.