-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ge-config-test Create tiered storage e2e test in Microsoft Azure
- Loading branch information
Showing
14 changed files
with
598 additions
and
28 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,19 @@ | ||
--- | ||
apiVersion: v2 | ||
name: aks-cluster | ||
description: A Helm chart for aks capi clusters | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.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,26 @@ | ||
{{/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/}} | ||
|
||
|
||
|
||
|
||
|
||
Congratulations on installing {{ .Chart.Name }}! | ||
|
||
You can get the kubeconfig file by running: | ||
|
||
TODO create task file |
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,63 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "aks-cluster.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "aks-cluster.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "aks-cluster.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "aks-cluster.labels" -}} | ||
helm.sh/chart: {{ include "aks-cluster.chart" . }} | ||
clusterctl.cluster.x-k8s.io/move-hierarchy: "true" | ||
{{ include "aks-cluster.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "aks-cluster.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "aks-cluster.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "aks-cluster.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "aks-cluster.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }} | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.0.0/16 | ||
controlPlaneRef: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
name: {{ include "aks-cluster.fullname" . }}-control-plane | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureCluster | ||
name: {{ include "aks-cluster.fullname" . }} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureCluster | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }} | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
identityRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureClusterIdentity | ||
name: {{ include "aks-cluster.fullname" . }} | ||
location: {{ .Values.location }} | ||
networkSpec: | ||
subnets: | ||
- name: control-plane-subnet | ||
role: control-plane | ||
- name: node-subnet | ||
role: node | ||
vnet: | ||
name: {{ include "aks-cluster.fullname" . }}-vnet | ||
resourceGroup: {{ .Values.resourceGroup }} | ||
subscriptionID: {{ .Values.subscriptionID }} | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }}-control-plane | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
apiServer: | ||
extraArgs: | ||
cloud-provider: external | ||
timeoutForControlPlane: 20m | ||
controllerManager: | ||
extraArgs: | ||
allocate-node-cidrs: "false" | ||
cloud-provider: external | ||
cluster-name: {{ include "aks-cluster.fullname" . }} | ||
etcd: | ||
local: | ||
dataDir: /var/lib/etcddisk/etcd | ||
extraArgs: | ||
quota-backend-bytes: "8589934592" | ||
diskSetup: | ||
filesystems: | ||
- device: /dev/disk/azure/scsi1/lun0 | ||
extraOpts: | ||
- -E | ||
- lazy_itable_init=1,lazy_journal_init=1 | ||
filesystem: ext4 | ||
label: etcd_disk | ||
- device: ephemeral0.1 | ||
filesystem: ext4 | ||
label: ephemeral0 | ||
replaceFS: ntfs | ||
partitions: | ||
- device: /dev/disk/azure/scsi1/lun0 | ||
layout: true | ||
overwrite: false | ||
tableType: gpt | ||
files: | ||
- contentFrom: | ||
secret: | ||
key: control-plane-azure.json | ||
name: {{ include "aks-cluster.fullname" . }}-control-plane-azure-json | ||
owner: root:root | ||
path: /etc/kubernetes/azure.json | ||
permissions: "0644" | ||
initConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
azure-container-registry-config: /etc/kubernetes/azure.json | ||
cloud-provider: external | ||
name: {{ printf "'{{ ds.meta_data[\"local_hostname\"] }}'" }} | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
azure-container-registry-config: /etc/kubernetes/azure.json | ||
cloud-provider: external | ||
name: {{ printf "'{{ ds.meta_data[\"local_hostname\"] }}'" }} | ||
mounts: | ||
- - LABEL=etcd_disk | ||
- /var/lib/etcddisk | ||
postKubeadmCommands: [] | ||
preKubeadmCommands: [] | ||
machineTemplate: | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ include "aks-cluster.fullname" . }}-control-plane | ||
replicas: {{ .Values.controlPlaneReplicas }} | ||
version: {{ .Values.kubernetesVersion }} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }}-control-plane | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
template: | ||
spec: | ||
dataDisks: | ||
- diskSizeGB: 256 | ||
lun: 0 | ||
nameSuffix: etcddisk | ||
osDisk: | ||
diskSizeGB: 128 | ||
osType: Linux | ||
sshPublicKey: "" | ||
vmSize: Standard_B2s | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }} | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
clusterName: {{ include "aks-cluster.fullname" . }} | ||
replicas: {{ .Values.workerReplicas }} | ||
selector: | ||
matchLabels: null | ||
template: | ||
spec: | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: {{ include "aks-cluster.fullname" . }}-workers | ||
clusterName: {{ include "aks-cluster.fullname" . }} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
name: {{ include "aks-cluster.fullname" . }}-workers | ||
version: {{ .Values.kubernetesVersion }} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureMachineTemplate | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }}-workers | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
template: | ||
spec: | ||
osDisk: | ||
diskSizeGB: 128 | ||
osType: Linux | ||
sshPublicKey: "" | ||
vmSize: Standard_B2s | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }}-workers | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
template: | ||
spec: | ||
files: | ||
- contentFrom: | ||
secret: | ||
key: worker-node-azure.json | ||
name: {{ include "aks-cluster.fullname" . }}-workers-azure-json | ||
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: {{ printf "'{{ ds.meta_data[\"local_hostname\"] }}'" }} | ||
preKubeadmCommands: [] | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureClusterIdentity | ||
metadata: | ||
name: {{ include "aks-cluster.fullname" . }} | ||
namespace: {{ .Release.namespace | default "default" }} | ||
labels: {{ include "aks-cluster.labels" . | nindent 4 }} | ||
spec: | ||
allowedNamespaces: {} | ||
clientID: {{ .Values.clientID }} | ||
clientSecret: | ||
name: {{ .Values.clientSecret.name }} | ||
namespace: {{ .Values.clientSecret.namespace }} | ||
tenantID: {{ .Values.tenantID }} | ||
type: ServicePrincipal |
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 @@ | ||
--- | ||
# Default values for aks-cluster. | ||
|
||
# nameOverride: "" | ||
# fullNameOverride: "" | ||
|
||
# Make sure to use same Kubernetes version here as building the GCE image | ||
kubernetesVersion: 1.26.3 | ||
|
||
# Name of the Azure datacenter location. Change this value to your desired location | ||
location: "westus2" | ||
|
||
clientID: "" | ||
tenantID: "" | ||
|
||
resourceGroup: "" | ||
|
||
subscriptionID: "" | ||
|
||
controlPlaneReplicas: 1 | ||
workerReplicas: 1 | ||
|
||
clientSecret: | ||
name: "" | ||
namespace: "" |
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
Oops, something went wrong.