This commit is contained in:
jonas
2021-10-19 11:54:30 +02:00
parent be783f12ed
commit 6edffbc0fd
25 changed files with 139 additions and 89 deletions

View File

@@ -0,0 +1,16 @@
{% for dist, items in pillar['tlu-harvester']['images'].items() -%}
{% for item in items -%}
---
apiVersion: harvesterhci.io/v1beta1
kind: VirtualMachineImage
metadata:
name: {{ item['checksum'][-10:] }}
namespace: {{ item['ns'] | default('default') }}
spec:
displayName: {{ item['name'] | default(item['url'].split('/')[-1]) }}
pvcName: ""
pvcNamespace: ""
sourceType: download
url: http://{{ pillar['network']['ip'] }}/images/{{ dist }}/{{ item['url'].split('/')[-1] }}
{% endfor -%}
{% endfor -%}

View File

@@ -0,0 +1,10 @@
{% for vlan in pillar['network']['vlan'] %}
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: {{ vlan['zone'] }}-{{ vlan['id'] }}
namespace: default
spec:
config: '{"cniVersion":"0.3.1","name":"{{ vlan['zone'] }}-{{ vlan['id'] }}","type":"bridge","bridge":"harvester-br0","promiscMode":true,"vlan":{{ vlan['id'] }},"ipam":{}}'
{% endfor %}