From b345dbbd903c7aa56530646f2d20dc76dd30696b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 12 Apr 2025 10:59:35 +0000 Subject: [PATCH 01/42] feat(docker-image)!: Update quay.io/containerdisks/ubuntu Docker tag to v24 --- ubuntu-vm-1/ubuntu/ubuntu-vm.yaml | 2 +- ubuntu-vm-2/ubuntu/ubuntu-vm.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml index af8a38c..ca1cb48 100644 --- a/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml @@ -33,7 +33,7 @@ spec: volumes: - name: containerdisk containerDisk: - image: quay.io/containerdisks/ubuntu:22.04 + image: quay.io/containerdisks/ubuntu:24.04 - name: cloudinitdisk cloudInitNoCloud: userData: | diff --git a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml index 78e909a..85e3a0d 100644 --- a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml @@ -33,7 +33,7 @@ spec: volumes: - name: containerdisk containerDisk: - image: quay.io/containerdisks/ubuntu:22.04 + image: quay.io/containerdisks/ubuntu:24.04 - name: cloudinitdisk cloudInitNoCloud: userData: | From 3f1180edae1faae348df6db709a2796c4e8ba574 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 11:37:24 +0200 Subject: [PATCH 02/42] Added Template and nginx for Image-hosting --- kustomization.yaml | 6 ++- repos/helm/nginx.yaml | 9 ++++ templates/image-server/ks-nginx.yaml | 18 +++++++ templates/image-server/ks-pvc.yaml | 18 +++++++ templates/image-server/nginx/helmrelease.yaml | 35 +++++++++++++ templates/image-server/pvc/image-storage.yaml | 12 +++++ templates/windowsserver/dv/windows-1-dv.yaml | 16 ++++++ templates/windowsserver/flavor/small.yaml | 50 +++++++++++++++++++ templates/windowsserver/ks-dv.yaml | 18 +++++++ templates/windowsserver/ks-flavor.yaml | 18 +++++++ 10 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 repos/helm/nginx.yaml create mode 100644 templates/image-server/ks-nginx.yaml create mode 100644 templates/image-server/ks-pvc.yaml create mode 100644 templates/image-server/nginx/helmrelease.yaml create mode 100644 templates/image-server/pvc/image-storage.yaml create mode 100644 templates/windowsserver/dv/windows-1-dv.yaml create mode 100644 templates/windowsserver/flavor/small.yaml create mode 100644 templates/windowsserver/ks-dv.yaml create mode 100644 templates/windowsserver/ks-flavor.yaml diff --git a/kustomization.yaml b/kustomization.yaml index c80a6dd..ccaf633 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -5,4 +5,8 @@ resources: - repos/ks.yaml - echo-server/ks.yaml - ubuntu-vm-1/ks.yaml - - ubuntu-vm-2/ks.yaml \ No newline at end of file + - ubuntu-vm-2/ks.yaml + - templates/image-server/ks-nginx.yaml + - templates/image-server/ks-pvc.yaml + - templates/windowsserver/ks-dv.yaml + - templates/windowsserver/ks-flavor.yaml \ No newline at end of file diff --git a/repos/helm/nginx.yaml b/repos/helm/nginx.yaml new file mode 100644 index 0000000..ed2e14c --- /dev/null +++ b/repos/helm/nginx.yaml @@ -0,0 +1,9 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRepository +metadata: + name: bitnami + namespace: ${TENANT_NAMESPACE}-ns +spec: + type: oci + interval: 5m + url: https://charts.bitnami.com/bitnami \ No newline at end of file diff --git a/templates/image-server/ks-nginx.yaml b/templates/image-server/ks-nginx.yaml new file mode 100644 index 0000000..4d60695 --- /dev/null +++ b/templates/image-server/ks-nginx.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app nginx + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./nginx + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/templates/image-server/ks-pvc.yaml b/templates/image-server/ks-pvc.yaml new file mode 100644 index 0000000..d8d36f3 --- /dev/null +++ b/templates/image-server/ks-pvc.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app pvc + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./pvc + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml new file mode 100644 index 0000000..6d93af4 --- /dev/null +++ b/templates/image-server/nginx/helmrelease.yaml @@ -0,0 +1,35 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: ${TENANT_NAMESPACE}-nginx + namespace: ${TENANT_NAMESPACE} +spec: + serviceAccountName: ${TECHNICAL_ACCOUNT} + interval: 5m + chart: + spec: + chart: nginx + version: 20.0.0 + sourceRef: + kind: HelmRepository + name: bitnami + namespace: ${TENANT_NAMESPACE} + values: + service: + type: ClusterIP + ports: + http: 80 + https: 443 + ingress: + enabled: true + hostname: nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud + tls: + - hosts: + - nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud + extraVolumes: + - name: ${TENANT_NAMESPACE}-image-storage + persistentVolumeClaim: + claimName: ${TENANT_NAMESPACE}-image-storage + extraVolumeMounts: + - name: ${TENANT_NAMESPACE}-image-storage + mountPath: /usr/share/nginx/html \ No newline at end of file diff --git a/templates/image-server/pvc/image-storage.yaml b/templates/image-server/pvc/image-storage.yaml new file mode 100644 index 0000000..b3d7960 --- /dev/null +++ b/templates/image-server/pvc/image-storage.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ${TENANT_NAMESPACE}-image-storage + namespace: ${TENANT_NAMESPACE} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 120Gi + storageClassName: ocs-storagecluster-ceph-rbd \ No newline at end of file diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml new file mode 100644 index 0000000..ec23f90 --- /dev/null +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -0,0 +1,16 @@ +apiVersion: cdi.kubevirt.io/v1beta1 +kind: DataVolume +metadata: + name: windows-server-datavolume + namespace: ${TENANT_NAMESPACE} +spec: + source: + http: + url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2" + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 120Gi + storageClassName: ocs-storagecluster-ceph-rbd \ No newline at end of file diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml new file mode 100644 index 0000000..99ff390 --- /dev/null +++ b/templates/windowsserver/flavor/small.yaml @@ -0,0 +1,50 @@ +apiVersion: template.openshift.io/v1 +kind: Template +metadata: + name: windows-server-2022-vm-template + namespace: ${TENANT_NAMESPACE} + annotations: + openshift.io/display-name: "Windows Server 2022 VM" + openshift.io/documentation-url: "https://docs.microsoft.com/en-us/windows-server/" + description: "Template for deploying a Windows Server 2022 Virtual Machine on OpenShift with KubeVirt." + tags: virtualmachine,windows,server,2022 +objects: + - apiVersion: kubevirt.io/v1 + kind: VirtualMachine + metadata: + name: ${VM_NAME} + namespace: ${TENANT_NAMESPACE} + labels: + app: windows-server + spec: + running: false + template: + metadata: + labels: + kubevirt.io/domain: ${VM_NAME} + spec: + domain: + cpu: + cores: 4 + devices: + disks: + - name: rootdisk + disk: + bus: virtio + memory: + guest: 8Gi + networks: + - name: default + pod: {} + volumes: + - name: rootdisk + persistentVolumeClaim: + claimName: windows-server-datavolume +parameters: + - name: windows-server-2022-small + description: Name of the Virtual Machine + required: true + - name: NAMESPACE + description: Namespace where to deploy + required: true + value: ${TENANT_NAMESPACE} \ No newline at end of file diff --git a/templates/windowsserver/ks-dv.yaml b/templates/windowsserver/ks-dv.yaml new file mode 100644 index 0000000..395913b --- /dev/null +++ b/templates/windowsserver/ks-dv.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app dv + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./dv + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/templates/windowsserver/ks-flavor.yaml b/templates/windowsserver/ks-flavor.yaml new file mode 100644 index 0000000..ffa8a83 --- /dev/null +++ b/templates/windowsserver/ks-flavor.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app flavor + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./flavor + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m From add151c9349a3915943aad47883590fec7e302c7 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 11:42:56 +0200 Subject: [PATCH 03/42] added suffix for path. Flux couldnt find Ks file --- templates/image-server/ks-nginx.yaml | 2 +- templates/image-server/ks-pvc.yaml | 2 +- templates/windowsserver/ks-dv.yaml | 2 +- templates/windowsserver/ks-flavor.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/image-server/ks-nginx.yaml b/templates/image-server/ks-nginx.yaml index 4d60695..63881f9 100644 --- a/templates/image-server/ks-nginx.yaml +++ b/templates/image-server/ks-nginx.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./nginx + path: ./nginx/ prune: true sourceRef: kind: GitRepository diff --git a/templates/image-server/ks-pvc.yaml b/templates/image-server/ks-pvc.yaml index d8d36f3..4e3b016 100644 --- a/templates/image-server/ks-pvc.yaml +++ b/templates/image-server/ks-pvc.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./pvc + path: ./pvc/ prune: true sourceRef: kind: GitRepository diff --git a/templates/windowsserver/ks-dv.yaml b/templates/windowsserver/ks-dv.yaml index 395913b..077b42c 100644 --- a/templates/windowsserver/ks-dv.yaml +++ b/templates/windowsserver/ks-dv.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./dv + path: ./dv/ prune: true sourceRef: kind: GitRepository diff --git a/templates/windowsserver/ks-flavor.yaml b/templates/windowsserver/ks-flavor.yaml index ffa8a83..b170384 100644 --- a/templates/windowsserver/ks-flavor.yaml +++ b/templates/windowsserver/ks-flavor.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./flavor + path: ./flavor/ prune: true sourceRef: kind: GitRepository From d21846d35a2b46dc9597bd80908e5b1e8cff2f96 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 11:49:11 +0200 Subject: [PATCH 04/42] added proper path --- repos/helm/nginx.yaml | 2 +- templates/image-server/ks-nginx.yaml | 2 +- templates/image-server/ks-pvc.yaml | 2 +- templates/windowsserver/ks-dv.yaml | 2 +- templates/windowsserver/ks-flavor.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/helm/nginx.yaml b/repos/helm/nginx.yaml index ed2e14c..9d07024 100644 --- a/repos/helm/nginx.yaml +++ b/repos/helm/nginx.yaml @@ -1,4 +1,4 @@ -apiVersion: helm.toolkit.fluxcd.io/v2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: bitnami diff --git a/templates/image-server/ks-nginx.yaml b/templates/image-server/ks-nginx.yaml index 63881f9..3a7463c 100644 --- a/templates/image-server/ks-nginx.yaml +++ b/templates/image-server/ks-nginx.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./nginx/ + path: ./templates/image-server/nginx prune: true sourceRef: kind: GitRepository diff --git a/templates/image-server/ks-pvc.yaml b/templates/image-server/ks-pvc.yaml index 4e3b016..ec71dc4 100644 --- a/templates/image-server/ks-pvc.yaml +++ b/templates/image-server/ks-pvc.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./pvc/ + path: ./templates/image-server/pvc prune: true sourceRef: kind: GitRepository diff --git a/templates/windowsserver/ks-dv.yaml b/templates/windowsserver/ks-dv.yaml index 077b42c..3cfa0f1 100644 --- a/templates/windowsserver/ks-dv.yaml +++ b/templates/windowsserver/ks-dv.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./dv/ + path: ./templates/windowsserver/dv prune: true sourceRef: kind: GitRepository diff --git a/templates/windowsserver/ks-flavor.yaml b/templates/windowsserver/ks-flavor.yaml index b170384..97e0d27 100644 --- a/templates/windowsserver/ks-flavor.yaml +++ b/templates/windowsserver/ks-flavor.yaml @@ -7,7 +7,7 @@ spec: commonMetadata: labels: app.kubernetes.io/name: *app - path: ./flavor/ + path: ./templates/windowsserver/flavor prune: true sourceRef: kind: GitRepository From d73a595befd04db27197395be06d68e44753cc99 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 11:54:35 +0200 Subject: [PATCH 05/42] changed metadata name due to error --- templates/image-server/nginx/helmrelease.yaml | 2 +- templates/windowsserver/flavor/small.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml index 6d93af4..f50e1e9 100644 --- a/templates/image-server/nginx/helmrelease.yaml +++ b/templates/image-server/nginx/helmrelease.yaml @@ -1,7 +1,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: - name: ${TENANT_NAMESPACE}-nginx + name: nginx namespace: ${TENANT_NAMESPACE} spec: serviceAccountName: ${TECHNICAL_ACCOUNT} diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 99ff390..91925af 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -1,7 +1,7 @@ apiVersion: template.openshift.io/v1 kind: Template metadata: - name: windows-server-2022-vm-template + name: windows-server-2022-small namespace: ${TENANT_NAMESPACE} annotations: openshift.io/display-name: "Windows Server 2022 VM" From 38bd40b2ec7de8a022a6b9cd2ba04a812b743fb4 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 11:57:36 +0200 Subject: [PATCH 06/42] deleted OCI helmchart type --- repos/helm/nginx.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/repos/helm/nginx.yaml b/repos/helm/nginx.yaml index 9d07024..78cf6bb 100644 --- a/repos/helm/nginx.yaml +++ b/repos/helm/nginx.yaml @@ -4,6 +4,5 @@ metadata: name: bitnami namespace: ${TENANT_NAMESPACE}-ns spec: - type: oci interval: 5m url: https://charts.bitnami.com/bitnami \ No newline at end of file From 0b8d38cc8426b8f15453e4f5c64431f5f42e1339 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 12:02:20 +0200 Subject: [PATCH 07/42] changed parameter name --- templates/windowsserver/flavor/small.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 91925af..fc3604f 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -41,7 +41,7 @@ objects: persistentVolumeClaim: claimName: windows-server-datavolume parameters: - - name: windows-server-2022-small + - name: windows_server_2022_small description: Name of the Virtual Machine required: true - name: NAMESPACE From 2b363b60e637631e9419cd0b15fac417421d5625 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 12:38:49 +0200 Subject: [PATCH 08/42] changed nginx uri and file name --- repos/helm/{nginx.yaml => bitnami.yaml} | 5 +++-- templates/windowsserver/dv/windows-1-dv.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) rename repos/helm/{nginx.yaml => bitnami.yaml} (54%) diff --git a/repos/helm/nginx.yaml b/repos/helm/bitnami.yaml similarity index 54% rename from repos/helm/nginx.yaml rename to repos/helm/bitnami.yaml index 78cf6bb..ee7cb0f 100644 --- a/repos/helm/nginx.yaml +++ b/repos/helm/bitnami.yaml @@ -2,7 +2,8 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: bitnami - namespace: ${TENANT_NAMESPACE}-ns + namespace: ${TENANT_NAMESPACE} spec: + type: oci interval: 5m - url: https://charts.bitnami.com/bitnami \ No newline at end of file + url: oci://registry-1.docker.io/bitnamicharts \ No newline at end of file diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml index ec23f90..1880b7a 100644 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -6,7 +6,7 @@ metadata: spec: source: http: - url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2" + url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2 " pvc: accessModes: - ReadWriteOnce From 298fdc6296b1181644acaa2817ddb3a3d6f9ae04 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 12:46:18 +0200 Subject: [PATCH 09/42] remove storage class --- templates/windowsserver/dv/windows-1-dv.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml index 1880b7a..f318282 100644 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -12,5 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 120Gi - storageClassName: ocs-storagecluster-ceph-rbd \ No newline at end of file + storage: 120Gi \ No newline at end of file From 6c434aba0f3e2262cfab14fb0faa85915e479474 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 13:01:48 +0200 Subject: [PATCH 10/42] changed uri --- templates/windowsserver/dv/windows-1-dv.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml index f318282..4eec60f 100644 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -6,7 +6,7 @@ metadata: spec: source: http: - url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2 " + url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2" pvc: accessModes: - ReadWriteOnce From 5e984efce512bd6840f9715d6a0cb5b3a0d6d006 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 16:44:37 +0200 Subject: [PATCH 11/42] deleted storageclass --- templates/image-server/pvc/image-storage.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/image-server/pvc/image-storage.yaml b/templates/image-server/pvc/image-storage.yaml index b3d7960..98e3875 100644 --- a/templates/image-server/pvc/image-storage.yaml +++ b/templates/image-server/pvc/image-storage.yaml @@ -8,5 +8,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 120Gi - storageClassName: ocs-storagecluster-ceph-rbd \ No newline at end of file + storage: 120Gi \ No newline at end of file From 745243103e0e8556123f3557ba09c182d2e890a1 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 16:59:56 +0200 Subject: [PATCH 12/42] Changed interval rate --- repos/helm/bitnami.yaml | 2 +- templates/image-server/nginx/helmrelease.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/helm/bitnami.yaml b/repos/helm/bitnami.yaml index ee7cb0f..b9f3976 100644 --- a/repos/helm/bitnami.yaml +++ b/repos/helm/bitnami.yaml @@ -5,5 +5,5 @@ metadata: namespace: ${TENANT_NAMESPACE} spec: type: oci - interval: 5m + interval: 60m url: oci://registry-1.docker.io/bitnamicharts \ No newline at end of file diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml index f50e1e9..c052d0a 100644 --- a/templates/image-server/nginx/helmrelease.yaml +++ b/templates/image-server/nginx/helmrelease.yaml @@ -5,11 +5,11 @@ metadata: namespace: ${TENANT_NAMESPACE} spec: serviceAccountName: ${TECHNICAL_ACCOUNT} - interval: 5m + interval: 10m chart: spec: chart: nginx - version: 20.0.0 + version: 19.1.1 sourceRef: kind: HelmRepository name: bitnami From 241d06efd4cddaa1e477370b11f1c7f9c80eb395 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 17:29:32 +0200 Subject: [PATCH 13/42] remove https --- templates/image-server/nginx/helmrelease.yaml | 4 ---- templates/windowsserver/dv/windows-1-dv.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml index c052d0a..1e124b4 100644 --- a/templates/image-server/nginx/helmrelease.yaml +++ b/templates/image-server/nginx/helmrelease.yaml @@ -19,13 +19,9 @@ spec: type: ClusterIP ports: http: 80 - https: 443 ingress: enabled: true hostname: nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud - tls: - - hosts: - - nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud extraVolumes: - name: ${TENANT_NAMESPACE}-image-storage persistentVolumeClaim: diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml index 4eec60f..af7a0dc 100644 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -6,7 +6,7 @@ metadata: spec: source: http: - url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/windows-server-2022.qcow2" + url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/win2022.qcow2" pvc: accessModes: - ReadWriteOnce From 26244b5df8861ee2b9ad34eb8effe715d6b8d0ec Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 17:47:18 +0200 Subject: [PATCH 14/42] added http route --- kustomization.yaml | 1 + templates/image-server/ks-route.yaml | 18 ++++++++++++++++++ templates/image-server/route/http | 14 ++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 templates/image-server/ks-route.yaml create mode 100644 templates/image-server/route/http diff --git a/kustomization.yaml b/kustomization.yaml index ccaf633..4efce0c 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -8,5 +8,6 @@ resources: - ubuntu-vm-2/ks.yaml - templates/image-server/ks-nginx.yaml - templates/image-server/ks-pvc.yaml + - templates/image-server/ks-route.yaml - templates/windowsserver/ks-dv.yaml - templates/windowsserver/ks-flavor.yaml \ No newline at end of file diff --git a/templates/image-server/ks-route.yaml b/templates/image-server/ks-route.yaml new file mode 100644 index 0000000..c3c4cf4 --- /dev/null +++ b/templates/image-server/ks-route.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app route + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./templates/image-server/route + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/templates/image-server/route/http b/templates/image-server/route/http new file mode 100644 index 0000000..f73ccf6 --- /dev/null +++ b/templates/image-server/route/http @@ -0,0 +1,14 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: nginx + namespace: ${TENANT_NAMESPACE} +spec: + to: + kind: Service + name: nginx + port: + targetPort: http + tls: + termination: edge + insecureEdgeTerminationPolicy: Allow \ No newline at end of file From 47716185a0bf5d997153987919fc357888eaa2e8 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 17:56:17 +0200 Subject: [PATCH 15/42] changed port --- templates/image-server/nginx/helmrelease.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml index 1e124b4..673bfaf 100644 --- a/templates/image-server/nginx/helmrelease.yaml +++ b/templates/image-server/nginx/helmrelease.yaml @@ -18,7 +18,7 @@ spec: service: type: ClusterIP ports: - http: 80 + http: 8080 ingress: enabled: true hostname: nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud From 5cb908807878fc3dd3dc049934905c0a351eff29 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 18:21:58 +0200 Subject: [PATCH 16/42] forgot yaml extension --- templates/image-server/route/http.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 templates/image-server/route/http.yaml diff --git a/templates/image-server/route/http.yaml b/templates/image-server/route/http.yaml new file mode 100644 index 0000000..f73ccf6 --- /dev/null +++ b/templates/image-server/route/http.yaml @@ -0,0 +1,14 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: nginx + namespace: ${TENANT_NAMESPACE} +spec: + to: + kind: Service + name: nginx + port: + targetPort: http + tls: + termination: edge + insecureEdgeTerminationPolicy: Allow \ No newline at end of file From 2eed2ca5cca0d4d51ba82abf6004fe49c29574f6 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 16:23:22 +0000 Subject: [PATCH 17/42] Delete templates/image-server/route/http --- templates/image-server/route/http | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 templates/image-server/route/http diff --git a/templates/image-server/route/http b/templates/image-server/route/http deleted file mode 100644 index f73ccf6..0000000 --- a/templates/image-server/route/http +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - name: nginx - namespace: ${TENANT_NAMESPACE} -spec: - to: - kind: Service - name: nginx - port: - targetPort: http - tls: - termination: edge - insecureEdgeTerminationPolicy: Allow \ No newline at end of file From 2e0fb83385cc82bfa36890a0b91d79ea9fc4b858 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 18:34:45 +0200 Subject: [PATCH 18/42] changed uri --- templates/windowsserver/dv/windows-1-dv.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml index af7a0dc..e1401ff 100644 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ b/templates/windowsserver/dv/windows-1-dv.yaml @@ -6,7 +6,7 @@ metadata: spec: source: http: - url: "http://nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud/win2022.qcow2" + url: "https://nginx-demo.apps.ai-2.kvant.cloud/win2022.qcow2" pvc: accessModes: - ReadWriteOnce From 9147a76b4ff367a66127c506ae65f4bcff675b33 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Wed, 30 Apr 2025 19:49:51 +0200 Subject: [PATCH 19/42] specify port instead of protocol --- templates/image-server/route/http.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/image-server/route/http.yaml b/templates/image-server/route/http.yaml index f73ccf6..5588c19 100644 --- a/templates/image-server/route/http.yaml +++ b/templates/image-server/route/http.yaml @@ -8,7 +8,7 @@ spec: kind: Service name: nginx port: - targetPort: http + targetPort: 8080 tls: termination: edge insecureEdgeTerminationPolicy: Allow \ No newline at end of file From 42c3daf081dd5cfdd892fa4e7b50e7788bcde363 Mon Sep 17 00:00:00 2001 From: Angel Nunez Mencias Date: Thu, 1 May 2025 22:58:40 +0200 Subject: [PATCH 20/42] moved bjw-s helmrepository --- repos/helm/bjw-s.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repos/helm/bjw-s.yaml b/repos/helm/bjw-s.yaml index 932c059..c635333 100644 --- a/repos/helm/bjw-s.yaml +++ b/repos/helm/bjw-s.yaml @@ -6,7 +6,6 @@ metadata: name: bjw-s namespace: ${TENANT_NAMESPACE}-ns spec: - type: oci interval: 5m - url: oci://ghcr.io/bjw-s/helm + url: https://bjw-s-labs.github.io/helm-charts From 7998d9e9a32b6c3abbb2ee9e5c6fcf918aa21899 Mon Sep 17 00:00:00 2001 From: Angel Nunez Mencias Date: Thu, 1 May 2025 23:09:44 +0200 Subject: [PATCH 21/42] fix bjw-s namespace --- repos/helm/bjw-s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/helm/bjw-s.yaml b/repos/helm/bjw-s.yaml index c635333..90cdc7f 100644 --- a/repos/helm/bjw-s.yaml +++ b/repos/helm/bjw-s.yaml @@ -4,7 +4,7 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: bjw-s - namespace: ${TENANT_NAMESPACE}-ns + namespace: ${TENANT_NAMESPACE} spec: interval: 5m url: https://bjw-s-labs.github.io/helm-charts From 521eb0b8cc4dcbe6a79eff8856bfba05e979f4a0 Mon Sep 17 00:00:00 2001 From: Phoenix Date: Mon, 5 May 2025 11:45:29 +0200 Subject: [PATCH 22/42] keep pvc --- templates/image-server/pvc/image-storage.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/image-server/pvc/image-storage.yaml b/templates/image-server/pvc/image-storage.yaml index 98e3875..7af917f 100644 --- a/templates/image-server/pvc/image-storage.yaml +++ b/templates/image-server/pvc/image-storage.yaml @@ -3,9 +3,11 @@ kind: PersistentVolumeClaim metadata: name: ${TENANT_NAMESPACE}-image-storage namespace: ${TENANT_NAMESPACE} + annotations: + helm.sh/resource-policy: keep spec: accessModes: - ReadWriteOnce resources: requests: - storage: 120Gi \ No newline at end of file + storage: 120Gi From 6b7d7987b52467a0ff0c9711fd6f76d516861adb Mon Sep 17 00:00:00 2001 From: Sofiane Gerhardt Date: Mon, 5 May 2025 11:52:35 +0200 Subject: [PATCH 23/42] use targetNamespace --- templates/image-server/ks-pvc.yaml | 1 + templates/image-server/pvc/image-storage.yaml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/image-server/ks-pvc.yaml b/templates/image-server/ks-pvc.yaml index ec71dc4..200d87b 100644 --- a/templates/image-server/ks-pvc.yaml +++ b/templates/image-server/ks-pvc.yaml @@ -15,4 +15,5 @@ spec: wait: false interval: 30m retryInterval: 1m + targetNamespace: ${TENANT_NAMESPACE} timeout: 5m diff --git a/templates/image-server/pvc/image-storage.yaml b/templates/image-server/pvc/image-storage.yaml index 7af917f..1059377 100644 --- a/templates/image-server/pvc/image-storage.yaml +++ b/templates/image-server/pvc/image-storage.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: ${TENANT_NAMESPACE}-image-storage - namespace: ${TENANT_NAMESPACE} annotations: helm.sh/resource-policy: keep spec: From f6894ece74839eb7c7289d2276b086cc60a4383b Mon Sep 17 00:00:00 2001 From: Sofiane Gerhardt Date: Mon, 5 May 2025 11:55:12 +0200 Subject: [PATCH 24/42] use /app --- templates/image-server/nginx/helmrelease.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/image-server/nginx/helmrelease.yaml b/templates/image-server/nginx/helmrelease.yaml index 673bfaf..2822a7e 100644 --- a/templates/image-server/nginx/helmrelease.yaml +++ b/templates/image-server/nginx/helmrelease.yaml @@ -28,4 +28,4 @@ spec: claimName: ${TENANT_NAMESPACE}-image-storage extraVolumeMounts: - name: ${TENANT_NAMESPACE}-image-storage - mountPath: /usr/share/nginx/html \ No newline at end of file + mountPath: /app From a8f9431e05737b41496c77690083705f20a89037 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 15:07:42 +0200 Subject: [PATCH 25/42] combines dv and template yaml --- templates/windowsserver/dv/windows-1-dv.yaml | 15 ------- templates/windowsserver/flavor/small.yaml | 46 +++++++++++++------- templates/windowsserver/ks-dv.yaml | 18 -------- 3 files changed, 30 insertions(+), 49 deletions(-) delete mode 100644 templates/windowsserver/dv/windows-1-dv.yaml delete mode 100644 templates/windowsserver/ks-dv.yaml diff --git a/templates/windowsserver/dv/windows-1-dv.yaml b/templates/windowsserver/dv/windows-1-dv.yaml deleted file mode 100644 index e1401ff..0000000 --- a/templates/windowsserver/dv/windows-1-dv.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: cdi.kubevirt.io/v1beta1 -kind: DataVolume -metadata: - name: windows-server-datavolume - namespace: ${TENANT_NAMESPACE} -spec: - source: - http: - url: "https://nginx-demo.apps.ai-2.kvant.cloud/win2022.qcow2" - pvc: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 120Gi \ No newline at end of file diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index fc3604f..e03e616 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -4,18 +4,16 @@ metadata: name: windows-server-2022-small namespace: ${TENANT_NAMESPACE} annotations: - openshift.io/display-name: "Windows Server 2022 VM" - openshift.io/documentation-url: "https://docs.microsoft.com/en-us/windows-server/" - description: "Template for deploying a Windows Server 2022 Virtual Machine on OpenShift with KubeVirt." - tags: virtualmachine,windows,server,2022 + description: "Windows Server 2022 Standard VM + openshift.io/display-name: Windows Server 2022 + openshift.io/provider-display-name: Phoenix Systems AG + tags: virtualmachine,windows,2022 objects: - apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: ${VM_NAME} namespace: ${TENANT_NAMESPACE} - labels: - app: windows-server spec: running: false template: @@ -25,26 +23,42 @@ objects: spec: domain: cpu: - cores: 4 + cores: 2 + memory: + guest: 4Gi devices: disks: - name: rootdisk disk: bus: virtio - memory: - guest: 8Gi networks: - name: default pod: {} volumes: - name: rootdisk - persistentVolumeClaim: - claimName: windows-server-datavolume + dataVolume: + name: ${VM_NAME}-datavolume + - apiVersion: cdi.kubevirt.io/v1beta1 + kind: DataVolume + metadata: + name: ${VM_NAME}-datavolume + namespace: ${NAMESPACE} + spec: + source: + http: + url: ${IMAGE_URL} + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: ${PVC_SIZE} parameters: - - name: windows_server_2022_small - description: Name of the Virtual Machine + - name: IMAGE_URL + description: URL to your image repository required: true - - name: NAMESPACE - description: Namespace where to deploy + value: https://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 + - name: PVC_SIZE + description: PVC size (GiB) required: true - value: ${TENANT_NAMESPACE} \ No newline at end of file + value: 120Gi diff --git a/templates/windowsserver/ks-dv.yaml b/templates/windowsserver/ks-dv.yaml deleted file mode 100644 index 3cfa0f1..0000000 --- a/templates/windowsserver/ks-dv.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: &app dv - namespace: ${TENANT_NAMESPACE} -spec: - commonMetadata: - labels: - app.kubernetes.io/name: *app - path: ./templates/windowsserver/dv - prune: true - sourceRef: - kind: GitRepository - name: tenant-repos - wait: false - interval: 30m - retryInterval: 1m - timeout: 5m From 14589c1319f15bdf55d86280eba36ece6a14d104 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 15:09:34 +0200 Subject: [PATCH 26/42] changed kustomization --- kustomization.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/kustomization.yaml b/kustomization.yaml index 4efce0c..37eed61 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -9,5 +9,4 @@ resources: - templates/image-server/ks-nginx.yaml - templates/image-server/ks-pvc.yaml - templates/image-server/ks-route.yaml - - templates/windowsserver/ks-dv.yaml - templates/windowsserver/ks-flavor.yaml \ No newline at end of file From fe10a495922cd4979a4d8579f210d6b802ce1886 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 15:11:31 +0200 Subject: [PATCH 27/42] forgot " --- templates/windowsserver/flavor/small.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index e03e616..9d0f12e 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -4,7 +4,7 @@ metadata: name: windows-server-2022-small namespace: ${TENANT_NAMESPACE} annotations: - description: "Windows Server 2022 Standard VM + description: "Windows Server 2022 Standard VM" openshift.io/display-name: Windows Server 2022 openshift.io/provider-display-name: Phoenix Systems AG tags: virtualmachine,windows,2022 From 46c7522fc0864098ce727451fbb992016b83fdac Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 16:13:39 +0200 Subject: [PATCH 28/42] used more speicifc template --- templates/windowsserver/flavor/small.yaml | 66 +++++++++++++++++------ 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 9d0f12e..fb84e01 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -3,46 +3,77 @@ kind: Template metadata: name: windows-server-2022-small namespace: ${TENANT_NAMESPACE} + labels: + template.kubevirt.io/type: vm + os.template.kubevirt.io/win2k22: 'true' + workload.template.kubevirt.io/server: 'true' annotations: - description: "Windows Server 2022 Standard VM" + name.os.template.kubevirt.io/win2k22: Windows Server 2022 + description: Windows Server 2022 VM template (Small) openshift.io/display-name: Windows Server 2022 - openshift.io/provider-display-name: Phoenix Systems AG - tags: virtualmachine,windows,2022 + iconClass: icon-windows objects: - apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: - name: ${VM_NAME} - namespace: ${TENANT_NAMESPACE} + name: ${NAME} + annotations: + description: Windows Server 2022 VM Demo + labels: + app: ${NAME} + vm.kubevirt.io/template: windows-server-2022-template + os.template.kubevirt.io/win2k22: true spec: running: false template: metadata: + annotations: + vm.kubevirt.io/flavor: small + vm.kubevirt.io/os: win2k22 + vm.kubevirt.io/workload: server labels: - kubevirt.io/domain: ${VM_NAME} + kubevirt.io/domain: ${NAME} + kubevirt.io/size: small spec: domain: cpu: cores: 2 - memory: - guest: 4Gi + sockets: 1 + threads: 1 devices: disks: - - name: rootdisk - disk: + - disk: bus: virtio + name: rootdisk + interfaces: + - masquerade: {} + model: virtio + name: default + networkInterfaceMultiqueue: 'true' + rng: {} + features: + acpi: {} + smm: + enabled: true + firmware: + bootloader: + efi: {} + memory: + guest: 4Gi + hostname: ${NAME} networks: - name: default pod: {} + terminationGracePeriodSeconds: 180 volumes: - name: rootdisk dataVolume: - name: ${VM_NAME}-datavolume + name: ${NAME}-datavolume - apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: - name: ${VM_NAME}-datavolume - namespace: ${NAMESPACE} + name: ${NAME}-datavolume + namespace: ${TENANT_NAMESPACE} spec: source: http: @@ -54,11 +85,14 @@ objects: requests: storage: ${PVC_SIZE} parameters: + - name: NAME + description: Name for the new VM + value: windows-server-2022 - name: IMAGE_URL - description: URL to your image repository + description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image required: true - value: https://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 + value: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 - name: PVC_SIZE - description: PVC size (GiB) + description: Size of the root disk PVC required: true value: 120Gi From 1ce69cf11c6f68e5a7460434fc83b93d295168d9 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 16:18:19 +0200 Subject: [PATCH 29/42] added quote --- templates/windowsserver/flavor/small.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index fb84e01..2830d2b 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -4,7 +4,7 @@ metadata: name: windows-server-2022-small namespace: ${TENANT_NAMESPACE} labels: - template.kubevirt.io/type: vm + template.kubevirt.io/type: 'vm' os.template.kubevirt.io/win2k22: 'true' workload.template.kubevirt.io/server: 'true' annotations: From 95c0ab6451818b86a69f60fce35daf029636a2be Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 16:20:51 +0200 Subject: [PATCH 30/42] added more quotes cause v1 cant handle it --- templates/windowsserver/flavor/small.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 2830d2b..808b672 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -20,9 +20,9 @@ objects: annotations: description: Windows Server 2022 VM Demo labels: - app: ${NAME} - vm.kubevirt.io/template: windows-server-2022-template - os.template.kubevirt.io/win2k22: true + app: '${NAME}' + vm.kubevirt.io/template: 'windows-server-2022-template' + os.template.kubevirt.io/win2k22: 'true' spec: running: false template: From 160759dbd24ad91cf1561eec5cf5faf1a3915b96 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 16:26:04 +0200 Subject: [PATCH 31/42] MORE QUOTES --- templates/windowsserver/flavor/small.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 808b672..a007fe9 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -32,7 +32,7 @@ objects: vm.kubevirt.io/os: win2k22 vm.kubevirt.io/workload: server labels: - kubevirt.io/domain: ${NAME} + kubevirt.io/domain: '${NAME}' kubevirt.io/size: small spec: domain: @@ -60,7 +60,7 @@ objects: efi: {} memory: guest: 4Gi - hostname: ${NAME} + hostname: '${NAME}' networks: - name: default pod: {} @@ -68,22 +68,22 @@ objects: volumes: - name: rootdisk dataVolume: - name: ${NAME}-datavolume + name: '${NAME}-datavolume' - apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: - name: ${NAME}-datavolume - namespace: ${TENANT_NAMESPACE} + name: '${NAME}-datavolume' + namespace: '${TENANT_NAMESPACE}' spec: source: http: - url: ${IMAGE_URL} + url: '${IMAGE_URL}' pvc: accessModes: - ReadWriteOnce resources: requests: - storage: ${PVC_SIZE} + storage: '${PVC_SIZE}' parameters: - name: NAME description: Name for the new VM From 67e8e5c0da7ca6c995b016f7773812c6548ddb7f Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 16:46:20 +0200 Subject: [PATCH 32/42] you guessed it. More quotes. --- templates/windowsserver/flavor/small.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index a007fe9..7d00960 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -2,7 +2,7 @@ apiVersion: template.openshift.io/v1 kind: Template metadata: name: windows-server-2022-small - namespace: ${TENANT_NAMESPACE} + namespace: '${TENANT_NAMESPACE}' labels: template.kubevirt.io/type: 'vm' os.template.kubevirt.io/win2k22: 'true' @@ -16,7 +16,7 @@ objects: - apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: - name: ${NAME} + name: '${NAME}' annotations: description: Windows Server 2022 VM Demo labels: @@ -49,7 +49,7 @@ objects: - masquerade: {} model: virtio name: default - networkInterfaceMultiqueue: 'true' + networkInterfaceMultiqueue: true rng: {} features: acpi: {} From 1ec6b25b7619a5795c0841fbcbb55b99ed50f248 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 17:01:24 +0200 Subject: [PATCH 33/42] set name requirement --- templates/windowsserver/flavor/small.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 7d00960..e97c5f2 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -87,6 +87,7 @@ objects: parameters: - name: NAME description: Name for the new VM + required: true value: windows-server-2022 - name: IMAGE_URL description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image From 39da3e0cf75c40426cd4302a47c0372476f3eaf7 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 17:06:15 +0200 Subject: [PATCH 34/42] changed variable to hardcoded value --- templates/windowsserver/flavor/small.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index e97c5f2..67a0223 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -16,11 +16,11 @@ objects: - apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: - name: '${NAME}' + name: windows-server-demo annotations: description: Windows Server 2022 VM Demo labels: - app: '${NAME}' + app: windows-server-demo vm.kubevirt.io/template: 'windows-server-2022-template' os.template.kubevirt.io/win2k22: 'true' spec: @@ -32,7 +32,7 @@ objects: vm.kubevirt.io/os: win2k22 vm.kubevirt.io/workload: server labels: - kubevirt.io/domain: '${NAME}' + kubevirt.io/domain: windows-server-demo kubevirt.io/size: small spec: domain: @@ -60,7 +60,7 @@ objects: efi: {} memory: guest: 4Gi - hostname: '${NAME}' + hostname: windows-server-demo networks: - name: default pod: {} @@ -68,11 +68,11 @@ objects: volumes: - name: rootdisk dataVolume: - name: '${NAME}-datavolume' + name: windows-server-datavolume-small - apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: - name: '${NAME}-datavolume' + name: windows-server-datavolume-small namespace: '${TENANT_NAMESPACE}' spec: source: @@ -85,10 +85,6 @@ objects: requests: storage: '${PVC_SIZE}' parameters: - - name: NAME - description: Name for the new VM - required: true - value: windows-server-2022 - name: IMAGE_URL description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image required: true From 3edc01b5f651c1951ed081648b6a20879c3737c6 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 17:17:37 +0200 Subject: [PATCH 35/42] openshift unable to use this variable to spawn DV --- templates/windowsserver/flavor/small.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 67a0223..b90ad2d 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -77,7 +77,7 @@ objects: spec: source: http: - url: '${IMAGE_URL}' + url: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 pvc: accessModes: - ReadWriteOnce @@ -85,10 +85,10 @@ objects: requests: storage: '${PVC_SIZE}' parameters: - - name: IMAGE_URL - description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image - required: true - value: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 + #- name: IMAGE_URL + # description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image + # required: true + # value: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 - name: PVC_SIZE description: Size of the root disk PVC required: true From 69d3c9bbad75d70454f17840ab1f71e7203a0044 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 17:31:27 +0200 Subject: [PATCH 36/42] wrong url --- templates/windowsserver/flavor/small.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index b90ad2d..7e72dae 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -77,7 +77,7 @@ objects: spec: source: http: - url: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 + url: https://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 pvc: accessModes: - ReadWriteOnce @@ -88,7 +88,7 @@ parameters: #- name: IMAGE_URL # description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image # required: true - # value: https://nginx.demo.apps.ai-2.kvant.cloud/win2022.qcow2 + # value: https://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 - name: PVC_SIZE description: Size of the root disk PVC required: true From 9fc1f8acc3227c958d56b21ad3497a334cbf787e Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 17:40:42 +0200 Subject: [PATCH 37/42] certificate failed to verify --- templates/windowsserver/flavor/small.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/windowsserver/flavor/small.yaml b/templates/windowsserver/flavor/small.yaml index 7e72dae..cb90c4b 100644 --- a/templates/windowsserver/flavor/small.yaml +++ b/templates/windowsserver/flavor/small.yaml @@ -77,7 +77,7 @@ objects: spec: source: http: - url: https://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 + url: http://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2 pvc: accessModes: - ReadWriteOnce From 8a1dcefe4440600928db7c4675297cbbaa066d80 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Mon, 5 May 2025 19:30:46 +0200 Subject: [PATCH 38/42] added alpine debug pod --- container/debug/alpine.yaml | 14 ++++++++++++++ container/ks-debug.yaml | 18 ++++++++++++++++++ kustomization.yaml | 1 + 3 files changed, 33 insertions(+) create mode 100644 container/debug/alpine.yaml create mode 100644 container/ks-debug.yaml diff --git a/container/debug/alpine.yaml b/container/debug/alpine.yaml new file mode 100644 index 0000000..8f2b5f9 --- /dev/null +++ b/container/debug/alpine.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +metadata: + name: alpine-test + namespace: ${TENANT_NAMESPACE} +spec: + containers: + - name: alpine + image: alpine:latest + command: ["/bin/sh"] + args: ["-c", "while true; do sleep 3600; done"] + stdin: true + tty: true + restartPolicy: Never \ No newline at end of file diff --git a/container/ks-debug.yaml b/container/ks-debug.yaml new file mode 100644 index 0000000..9c78fde --- /dev/null +++ b/container/ks-debug.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app debug + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./container/debug + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/kustomization.yaml b/kustomization.yaml index 37eed61..c494cd0 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -6,6 +6,7 @@ resources: - echo-server/ks.yaml - ubuntu-vm-1/ks.yaml - ubuntu-vm-2/ks.yaml + - container/ks-debug.yaml - templates/image-server/ks-nginx.yaml - templates/image-server/ks-pvc.yaml - templates/image-server/ks-route.yaml From 2f8a63eb7430b25bbbcd0747fc2094b92e0c9129 Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Tue, 6 May 2025 16:23:26 +0200 Subject: [PATCH 39/42] added another vm --- kustomization.yaml | 1 + ubuntu-vm-3/ks.yaml | 18 ++++++++++++ ubuntu-vm-3/ubuntu/ubuntu-vm.yaml | 48 +++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 ubuntu-vm-3/ks.yaml create mode 100644 ubuntu-vm-3/ubuntu/ubuntu-vm.yaml diff --git a/kustomization.yaml b/kustomization.yaml index c494cd0..80d2821 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -6,6 +6,7 @@ resources: - echo-server/ks.yaml - ubuntu-vm-1/ks.yaml - ubuntu-vm-2/ks.yaml + - ubuntu-vm-3/ks.yaml - container/ks-debug.yaml - templates/image-server/ks-nginx.yaml - templates/image-server/ks-pvc.yaml diff --git a/ubuntu-vm-3/ks.yaml b/ubuntu-vm-3/ks.yaml new file mode 100644 index 0000000..12912dc --- /dev/null +++ b/ubuntu-vm-3/ks.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app ubuntu-vm-3 + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./ubuntu-vm-3/ubuntu + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml new file mode 100644 index 0000000..be999e1 --- /dev/null +++ b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml @@ -0,0 +1,48 @@ +apiVersion: kubevirt.io/v1 +kind: VirtualMachine +metadata: + name: ubuntu-vm-3 + namespace: kubevirt-vms +spec: + running: true + template: + metadata: + labels: + kubevirt.io/domain: ubuntu-vm-3 + spec: + domain: + cpu: + cores: 2 + devices: + disks: + - disk: + bus: virtio + name: containerdisk + - disk: + bus: virtio + name: cloudinitdisk + resources: + requests: + memory: 2Gi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + memory: + guest: 2Gi + volumes: + - name: containerdisk + containerDisk: + image: quay.io/containerdisks/ubuntu:22.04 + - name: cloudinitdisk + cloudInitNoCloud: + userData: | + #cloud-config + hostname: ubuntu-vm-1 + ssh_pwauth: True + users: + - name: ubuntu + ssh-authorized-keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqlhZW/pPLK8zENt3o6tgl0QVinhGAF1sHvajqq3UvI ubuntu + sudo: ['ALL=(ALL) NOPASSWD:ALL'] + shell: /bin/bash \ No newline at end of file From 57de4fd2e6a4b00d08292aef81c9d4497447340c Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Tue, 6 May 2025 16:26:32 +0200 Subject: [PATCH 40/42] change specs --- ubuntu-vm-3/ubuntu/ubuntu-vm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml index be999e1..130b5b6 100644 --- a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml @@ -12,7 +12,7 @@ spec: spec: domain: cpu: - cores: 2 + cores: 1 devices: disks: - disk: @@ -27,7 +27,7 @@ spec: cpu: 1 limits: memory: 2Gi - cpu: 2 + cpu: 1 memory: guest: 2Gi volumes: From afb0db1f155072c9dfa6e91dd623a626eda30d6c Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Tue, 6 May 2025 16:47:44 +0200 Subject: [PATCH 41/42] changed namespace --- ubuntu-vm-3/ubuntu/ubuntu-vm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml index 130b5b6..3164a85 100644 --- a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml @@ -2,7 +2,7 @@ apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: ubuntu-vm-3 - namespace: kubevirt-vms + namespace: demo spec: running: true template: @@ -38,7 +38,7 @@ spec: cloudInitNoCloud: userData: | #cloud-config - hostname: ubuntu-vm-1 + hostname: ubuntu-vm-3 ssh_pwauth: True users: - name: ubuntu From 18f2ab51d157b35a8d77ed68dbebb28c95c4c2b5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 6 May 2025 15:13:42 +0000 Subject: [PATCH 42/42] feat(docker-image)!: Update quay.io/containerdisks/ubuntu Docker tag to v24 --- ubuntu-vm-1/ubuntu/ubuntu-vm.yaml | 2 +- ubuntu-vm-2/ubuntu/ubuntu-vm.yaml | 2 +- ubuntu-vm-3/ubuntu/ubuntu-vm.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml index af8a38c..ca1cb48 100644 --- a/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-1/ubuntu/ubuntu-vm.yaml @@ -33,7 +33,7 @@ spec: volumes: - name: containerdisk containerDisk: - image: quay.io/containerdisks/ubuntu:22.04 + image: quay.io/containerdisks/ubuntu:24.04 - name: cloudinitdisk cloudInitNoCloud: userData: | diff --git a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml index 78e909a..85e3a0d 100644 --- a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml @@ -33,7 +33,7 @@ spec: volumes: - name: containerdisk containerDisk: - image: quay.io/containerdisks/ubuntu:22.04 + image: quay.io/containerdisks/ubuntu:24.04 - name: cloudinitdisk cloudInitNoCloud: userData: | diff --git a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml index 3164a85..27029e6 100644 --- a/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-3/ubuntu/ubuntu-vm.yaml @@ -33,7 +33,7 @@ spec: volumes: - name: containerdisk containerDisk: - image: quay.io/containerdisks/ubuntu:22.04 + image: quay.io/containerdisks/ubuntu:24.04 - name: cloudinitdisk cloudInitNoCloud: userData: |