Verified Commit da98c160 authored by Hugo's avatar Hugo
Browse files

cleanup

parent 81a2caa3
......@@ -10,6 +10,8 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-lvm
annotations:
storageclass.kubernetes.io/is-default-class: "true"
allowVolumeExpansion: true
parameters:
fstype: "xfs"
......
......@@ -3,7 +3,7 @@
tasks:
- import_tasks: "tasks/provision.yaml"
- name: setup nodes
- name: setup infrastructure
hosts: all
remote_user: root
gather_facts: false
......@@ -17,7 +17,7 @@
- import_tasks: "tasks/setup_worker.yaml"
when: '"worker" in group_names'
- name: deploy k8s
- name: bootstrap and setup k8s
hosts: localhost
tasks:
- import_tasks: "tasks/deploy.yaml"
......
......@@ -45,7 +45,7 @@
name: cert-manager
chart_ref: jetstack/cert-manager
release_namespace: cert-manager
chart_version: 1.3.1
chart_version: 1.4.0
values:
installCRDs: true
......@@ -57,7 +57,7 @@
name: ingress-nginx
chart_ref: ingress-nginx/ingress-nginx
release_namespace: ingress-nginx
chart_version: 3.31.0
chart_version: 3.34.0
values:
controller:
kind: DaemonSet
......@@ -83,14 +83,14 @@
name: prometheus-stack
chart_ref: prometheus-community/kube-prometheus-stack
release_namespace: monitoring
chart_version: 16.0.0
chart_version: 16.12.1
values:
prometheus:
prometheusSpec:
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: openebs-lvm-im
storageClassName: openebs-lvm
accessModes: ["ReadWriteOnce"]
resources:
requests:
......@@ -103,7 +103,7 @@
name: openebs-lvmlocalpv
chart_ref: openebs-lvmlocalpv/lvm-localpv
release_namespace: kube-system
chart_version: 0.5.0
chart_version: 0.6.1
values:
lvmNode:
kubeletDir: "/var/lib/k0s/kubelet/"
......
- name: genreate k0sctl.yaml
- name: genrate k0sctl.yaml
template:
src: k0sctl.yaml.j2
dest: k0sctl.yaml
register: k0sctlConfig
- name: run k0sctl
shell: k0sctl apply
shell: k0sctl apply --disable-telemetry
when: k0sctlConfig.changed
- name: fetch kubeconfig
shell: k0sctl kubeconfig > kubeconfig
shell: k0sctl kubeconfig --disable-telemetry > kubeconfig
when: k0sctlConfig.changed
......@@ -7,6 +7,10 @@
hcloud_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
register: tf
- name: register cluster config
set_fact:
cluster: "{{ tf.outputs.cluster.value }}"
- name: register hosts
add_host:
name: "{{ item.value.publicIp }}"
......@@ -14,10 +18,6 @@
node: "{{ item.value }}"
node_pvs: '{{ item.value.volumes | dict2items | map(attribute="value") | selectattr("vg", "true") | map(attribute="device") }}'
node_disks: '{{ item.value.volumes | dict2items | map(attribute="value") | selectattr("vg", "false") | map(attribute="device") }}'
loop: "{{ tf.outputs.cluster.value.nodes | dict2items }}"
loop: "{{ cluster.nodes | dict2items }}"
loop_control:
label: "{{ item.key }}"
- name: register cluster config
set_fact:
cluster: "{{ tf.outputs.cluster.value }}"
......@@ -12,7 +12,7 @@ spec:
privateAddress: {{node.privateIp}}
{%endfor%}
k0s:
version: v1.21.1+k0s.0
version: v1.21.2+k0s.1
config:
apiVersion: k0s.k0sproject.io/v1beta1
kind: Cluster
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment