Add missing key/parameter;Fix dependency type;Add k8s version to filename
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2023-03-15 10:24:45 +01:00
parent daa7a240cc
commit 6bd49750a4
7 changed files with 14 additions and 2 deletions

View File

@ -25,6 +25,8 @@ steps:
- |
sed -i -e "s/<<img-password>>/$${SSH_PASSWORD}/g" \
packer/preseed/UbuntuServer22.04/user-data
- |
export K8S_VERSION=$(yq '.components.clusterapi.workload.version.k8s' < ./ansible/vars/metacluster.yml)
- |
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" \
ansible \
@ -45,6 +47,7 @@ steps:
-var repo_password=$${REPO_PASSWORD} \
-var ssh_password=$${SSH_PASSWORD} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var k8s_version=$K8S_VERSION
./packer
- |
packer build \

View File

@ -75,7 +75,9 @@
dest: /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/kustomization.yaml
vars:
_template:
fqdn: "{{ vapp['metacluster.fqdn'] }}"
network:
fqdn: "{{ vapp['metacluster.fqdn'] }}"
dnsserver: "{{ vapp['guestinfo.dnsserver'] }}"
rootca: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
# script:
# # Base64 encoded; to avoid variable substitution when clusterctl parses the cluster-template.yml
@ -168,6 +170,7 @@
_template:
cluster:
name: "{{ vapp['workloadcluster.name'] | lower }}"
namespace: default
network:
startip: "{{ vapp['ippool.startip'] }}"
endip: "{{ vapp['ippool.endip'] }}"

View File

@ -2,6 +2,7 @@ apiVersion: ipam.cluster.x-k8s.io/v1alpha1
kind: InClusterIPPool
metadata:
name: inclusterippool-{{ _template.cluster.name }}
namespace: {{ _template.cluster.namespace }}
spec:
start: {{ _template.cluster.network.startip }}
end: {{ _template.cluster.network.endip }}

View File

@ -76,6 +76,8 @@ patchesStrategicMerge:
- apiGroup: ipam.cluster.x-k8s.io
kind: InClusterIPPool
name: inclusterippool-${CLUSTER_NAME}
nameservers:
- {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}'
patchesJson6902:

View File

@ -296,6 +296,7 @@ dependencies:
extra_opts: --strip-components=1
- filename: kubectl-slice
url: https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.5/kubectl-slice_linux_x86_64.tar.gz
archive: compressed
# - filename: npp-prepper
# url: https://code.spamasaurus.com/api/packages/djpbessems/generic/npp-prepper/v0.5.1/npp-prepper
- filename: skopeo

View File

@ -53,7 +53,7 @@ build {
" -ManifestFileName '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.mf'",
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
" '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.ovf' \\",
" /output/airgapped-k8s.${source.name}.ova"
" /output/airgapped-k8s-${var.k8s_version}.${source.name}.ova"
]
}
}

View File

@ -33,3 +33,5 @@ variable "docker_username" {}
variable "docker_password" {
sensitive = true
}
variable "k8s_version" {}