-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1444 from tormath1/tormath1/flatcar
✨ templates: add flatcar template
- Loading branch information
Showing
35 changed files
with
979 additions
and
68 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
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
6 changes: 6 additions & 0 deletions
6
kustomize/v1alpha6/external-cloud-provider-flatcar/kustomization.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,6 @@ | ||
resources: | ||
- ../default | ||
|
||
patchesStrategicMerge: | ||
- patch-ccm.yaml | ||
- patch-flatcar.yaml |
43 changes: 43 additions & 0 deletions
43
kustomize/v1alpha6/external-cloud-provider-flatcar/patch-ccm.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,43 @@ | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
kubeadmConfigSpec: | ||
initConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
cloud-config: | ||
clusterConfiguration: | ||
apiServer: | ||
extraArgs: | ||
cloud-provider: external | ||
cloud-config: | ||
extraVolumes: | ||
controllerManager: | ||
extraArgs: | ||
cloud-provider: external | ||
cloud-config: | ||
extraVolumes: | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
cloud-config: | ||
files: [] | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
spec: | ||
template: | ||
spec: | ||
files: [] | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
cloud-config: |
97 changes: 97 additions & 0 deletions
97
kustomize/v1alpha6/external-cloud-provider-flatcar/patch-flatcar.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,97 @@ | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackCluster | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
spec: | ||
apiServerLoadBalancer: | ||
$patch: delete | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
kubeadmConfigSpec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
initConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
format: ignition | ||
ignition: | ||
containerLinuxConfig: | ||
additionalConfig: | | ||
systemd: | ||
units: | ||
- name: [email protected] | ||
enabled: true | ||
- name: kubeadm.service | ||
enabled: true | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
Requires=containerd.service coreos-metadata.service | ||
After=containerd.service coreos-metadata.service | ||
[Service] | ||
EnvironmentFile=/run/metadata/flatcar | ||
preKubeadmCommands: | ||
- export COREOS_OPENSTACK_HOSTNAME=$${COREOS_OPENSTACK_HOSTNAME%.*} | ||
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp | ||
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
preKubeadmCommands: | ||
- export COREOS_OPENSTACK_HOSTNAME=$${COREOS_OPENSTACK_HOSTNAME%.*} | ||
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp | ||
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml | ||
format: ignition | ||
ignition: | ||
containerLinuxConfig: | ||
additionalConfig: | | ||
systemd: | ||
units: | ||
- name: [email protected] | ||
enabled: true | ||
- name: kubeadm.service | ||
enabled: true | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
Requires=containerd.service coreos-metadata.service | ||
After=containerd.service coreos-metadata.service | ||
[Service] | ||
EnvironmentFile=/run/metadata/flatcar | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
spec: | ||
template: | ||
spec: | ||
image: ${OPENSTACK_FLATCAR_IMAGE_NAME} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-control-plane | ||
spec: | ||
template: | ||
spec: | ||
image: ${OPENSTACK_FLATCAR_IMAGE_NAME} |
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,5 @@ | ||
resources: | ||
- ../default | ||
|
||
patchesStrategicMerge: | ||
- patch-flatcar.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,117 @@ | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackCluster | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
spec: | ||
apiServerLoadBalancer: | ||
$patch: delete | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
kubeadmConfigSpec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
kubeletExtraArgs: | ||
cloud-config: /etc/kubernetes/cloud.conf | ||
cloud-provider: openstack | ||
initConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
kubeletExtraArgs: | ||
cloud-provider: openstack | ||
cloud-config: /etc/kubernetes/cloud.conf | ||
format: ignition | ||
ignition: | ||
containerLinuxConfig: | ||
additionalConfig: | | ||
systemd: | ||
units: | ||
- name: [email protected] | ||
enabled: true | ||
- name: kubeadm.service | ||
enabled: true | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
Requires=containerd.service coreos-metadata.service | ||
After=containerd.service coreos-metadata.service | ||
[Service] | ||
EnvironmentFile=/run/metadata/flatcar | ||
preKubeadmCommands: | ||
- export COREOS_OPENSTACK_HOSTNAME=$${COREOS_OPENSTACK_HOSTNAME%.*} | ||
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp | ||
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
spec: | ||
template: | ||
spec: | ||
files: | ||
- content: ${OPENSTACK_CLOUD_PROVIDER_CONF_B64} | ||
encoding: base64 | ||
owner: root | ||
path: /etc/kubernetes/cloud.conf | ||
permissions: "0600" | ||
- content: ${OPENSTACK_CLOUD_CACERT_B64} | ||
encoding: base64 | ||
owner: root | ||
path: /etc/certs/cacert | ||
permissions: "0600" | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: $${COREOS_OPENSTACK_HOSTNAME} | ||
kubeletExtraArgs: | ||
cloud-config: /etc/kubernetes/cloud.conf | ||
cloud-provider: openstack | ||
preKubeadmCommands: | ||
- export COREOS_OPENSTACK_HOSTNAME=$${COREOS_OPENSTACK_HOSTNAME%.*} | ||
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp | ||
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml | ||
format: ignition | ||
ignition: | ||
containerLinuxConfig: | ||
additionalConfig: | | ||
systemd: | ||
units: | ||
- name: [email protected] | ||
enabled: true | ||
- name: kubeadm.service | ||
enabled: true | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
Requires=containerd.service coreos-metadata.service | ||
After=containerd.service coreos-metadata.service | ||
[Service] | ||
EnvironmentFile=/run/metadata/flatcar | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
spec: | ||
template: | ||
spec: | ||
image: ${OPENSTACK_FLATCAR_IMAGE_NAME} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 | ||
kind: OpenStackMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME}-control-plane | ||
spec: | ||
template: | ||
spec: | ||
image: ${OPENSTACK_FLATCAR_IMAGE_NAME} |
Oops, something went wrong.