generated from phoenix-oss/tenant-tpl
Compare commits
132 commits
renovate/h
...
main
Author | SHA1 | Date | |
---|---|---|---|
0e0712ea4e | |||
1e0cfb816f | |||
4f026307b6 | |||
7125bd6626 | |||
13b6e6f3ae | |||
5f1f60b786 | |||
88a93c67d3 | |||
1c7e58e740 | |||
0256ce589a | |||
6d1b9906a5 | |||
1fc30168ef | |||
1139c70acb | |||
0154dc0dbd | |||
ed5db93338 | |||
d0fba712d4 | |||
707b1d0bd8 | |||
001fc5a5de | |||
a49dd4de89 | |||
d3b650eff2 | |||
831c25c09e | |||
b6e8ec3b0e | |||
ad99d6cfbd | |||
1738825686 | |||
285cf3f94f | |||
73ee627f99 | |||
48fbc45319 | |||
7a00f2dac7 | |||
7a9b3176e8 | |||
46b0108828 | |||
5db658f639 | |||
c84c1fcd78 | |||
fb1c82659f | |||
b15d8e6882 | |||
f76153ff5d | |||
9980d50b07 | |||
6a719ccdc8 | |||
516c1bd034 | |||
da7f7f73c1 | |||
410cb99173 | |||
4cf5bfcceb | |||
070ef198ed | |||
1e611e5621 | |||
bd27459945 | |||
8e7ea57673 | |||
1a44751d94 | |||
32ff5115f0 | |||
9532ba8fe8 | |||
883d8152b8 | |||
284040d065 | |||
de9f1d5014 | |||
633f1ca564 | |||
98ee757f94 | |||
eeaece034f | |||
d5f8404835 | |||
b30d768472 | |||
8862ff90eb | |||
628d1de0e3 | |||
4ac200e1dc | |||
ad92d3393a | |||
49c60fe87e | |||
be88f635f1 | |||
1118c89f66 | |||
7134c2d905 | |||
989a3467be | |||
dc6e4274dd | |||
29d8d2fed2 | |||
631b4a1ede | |||
84bd7195fc | |||
1b8a324f7e | |||
c32ae8b40a | |||
4c5a76347d | |||
64458e5bad | |||
4d2924f7d4 | |||
63019b6529 | |||
bfd039dd32 | |||
55105e3704 | |||
aacdc46fb0 | |||
387d3e65bf | |||
bd1784429c | |||
99076daf8e | |||
ca3e37e667 | |||
87de70c51e | |||
5e7cad0edc | |||
78d1e0d3ab | |||
0f54f22879 | |||
1604b7e613 | |||
9b64dfad0b | |||
86f10cbd6d | |||
6a78fbf5c0 | |||
4fda3a9eff | |||
d638ec4c45 | |||
e2fb066279 | |||
6abfc970df | |||
1f600af0f4 | |||
364d47707c | |||
029664c6f7 | |||
a9df0a48c6 | |||
65c809bb44 | |||
70f0098dbd | |||
cebdd2ad2c | |||
752a56fa4e | |||
afb0db1f15 | |||
57de4fd2e6 | |||
2f8a63eb74 | |||
8a1dcefe44 | |||
9fc1f8acc3 | |||
69d3c9bbad | |||
3edc01b5f6 | |||
39da3e0cf7 | |||
1ec6b25b76 | |||
67e8e5c0da | |||
160759dbd2 | |||
95c0ab6451 | |||
1ce69cf11c | |||
46c7522fc0 | |||
fe10a49592 | |||
14589c1319 | |||
a8f9431e05 | |||
f6894ece74 | |||
6b7d7987b5 | |||
|
521eb0b8cc | ||
7998d9e9a3 | |||
42c3daf081 | |||
9147a76b4f | |||
2e0fb83385 | |||
2eed2ca5cc | |||
5cb9088078 | |||
47716185a0 | |||
26244b5df8 | |||
241d06efd4 | |||
745243103e | |||
5e984efce5 |
46 changed files with 1244 additions and 174 deletions
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*.sh text eol=lf
|
||||||
|
*.yml text eol=lf
|
||||||
|
*.yaml text eol=lf
|
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Eclipse
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
bin/
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
.idea
|
||||||
|
*.ipr
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# NetBeans
|
||||||
|
nb-configuration.xml
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode
|
||||||
|
.factorypath
|
||||||
|
|
||||||
|
# OSX
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# patch
|
||||||
|
*.orig
|
||||||
|
*.rej
|
||||||
|
|
||||||
|
# Local environment
|
||||||
|
.env
|
||||||
|
|
14
container/debug/alpine.yaml
Normal file
14
container/debug/alpine.yaml
Normal file
|
@ -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
|
14
container/debug2/alpine.yaml
Normal file
14
container/debug2/alpine.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: alpine-test2
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: alpine2
|
||||||
|
image: alpine:latest
|
||||||
|
command: ["/bin/sh"]
|
||||||
|
args: ["-c", "while true; do sleep 3600; done"]
|
||||||
|
stdin: true
|
||||||
|
tty: true
|
||||||
|
restartPolicy: Never
|
|
@ -1,13 +1,13 @@
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: &app dv
|
name: &app debug
|
||||||
namespace: ${TENANT_NAMESPACE}
|
namespace: ${TENANT_NAMESPACE}
|
||||||
spec:
|
spec:
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
path: ./templates/windowsserver/dv
|
path: ./container/debug
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
|
@ -1,103 +0,0 @@
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: &app echo-server
|
|
||||||
spec:
|
|
||||||
serviceAccountName: ${TECHNICAL_ACCOUNT}
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: app-template
|
|
||||||
version: 3.2.1
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bjw-s
|
|
||||||
namespace: ${TENANT_NAMESPACE}
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
strategy: rollback
|
|
||||||
retries: 3
|
|
||||||
values:
|
|
||||||
controllers:
|
|
||||||
echo-server:
|
|
||||||
replicas: 2
|
|
||||||
strategy: RollingUpdate
|
|
||||||
containers:
|
|
||||||
app:
|
|
||||||
image:
|
|
||||||
repository: ghcr.io/mendhak/http-https-echo
|
|
||||||
tag: 33
|
|
||||||
env:
|
|
||||||
HTTP_PORT: &port 8080
|
|
||||||
LOG_WITHOUT_NEWLINE: true
|
|
||||||
LOG_IGNORE_PATH: /healthz
|
|
||||||
PROMETHEUS_ENABLED: true
|
|
||||||
probes:
|
|
||||||
liveness: &probes
|
|
||||||
enabled: true
|
|
||||||
custom: true
|
|
||||||
spec:
|
|
||||||
httpGet:
|
|
||||||
path: /healthz
|
|
||||||
port: *port
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 1
|
|
||||||
failureThreshold: 3
|
|
||||||
readiness: *probes
|
|
||||||
securityContext:
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
capabilities: { drop: ["ALL"] }
|
|
||||||
seccompProfile:
|
|
||||||
type: RuntimeDefault
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 64Mi
|
|
||||||
limits:
|
|
||||||
memory: 64Mi
|
|
||||||
cpu: 100m
|
|
||||||
defaultPodOptions:
|
|
||||||
securityContext:
|
|
||||||
runAsNonRoot: true
|
|
||||||
seccompProfile: { type: RuntimeDefault }
|
|
||||||
topologySpreadConstraints:
|
|
||||||
- maxSkew: 1
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
whenUnsatisfiable: DoNotSchedule
|
|
||||||
labelSelector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
service:
|
|
||||||
app:
|
|
||||||
controller: echo-server
|
|
||||||
ports:
|
|
||||||
http:
|
|
||||||
port: *port
|
|
||||||
serviceMonitor:
|
|
||||||
app:
|
|
||||||
serviceName: echo-server
|
|
||||||
endpoints:
|
|
||||||
- port: http
|
|
||||||
scheme: http
|
|
||||||
path: /metrics
|
|
||||||
interval: 1m
|
|
||||||
scrapeTimeout: 10s
|
|
||||||
ingress:
|
|
||||||
app:
|
|
||||||
className: external
|
|
||||||
hosts:
|
|
||||||
- host: "{{ .Release.Name }}-${TENANT_DOMAIN}"
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
service:
|
|
||||||
identifier: app
|
|
||||||
port: http
|
|
||||||
|
|
18
firewall-s3/ks-vm.yaml
Normal file
18
firewall-s3/ks-vm.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app fortigate-s3
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./firewall-s3/vm/ksd
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
30
firewall-s3/vm/ksd/loadbalancers/fortigate-wan.yaml
Normal file
30
firewall-s3/vm/ksd/loadbalancers/fortigate-wan.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fortigate-lb
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: fortigate-lb
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
externalTrafficPolicy: Local
|
||||||
|
ports:
|
||||||
|
- port: 4500
|
||||||
|
name: ipsec-nat
|
||||||
|
targetPort: 4500
|
||||||
|
protocol: UDP
|
||||||
|
- port: 500
|
||||||
|
name: key-management
|
||||||
|
targetPort: 500
|
||||||
|
protocol: UDP
|
||||||
|
#- port: 22
|
||||||
|
# name: ssh
|
||||||
|
# targetPort: 22
|
||||||
|
# protocol: TCP
|
||||||
|
- port: 443
|
||||||
|
name: https
|
||||||
|
targetPort: 443
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
kubevirt.io/domain: fortigate-ksd
|
20
firewall-s3/vm/ksd/network-definitions/lan.yaml
Normal file
20
firewall-s3/vm/ksd/network-definitions/lan.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: "k8s.cni.cncf.io/v1"
|
||||||
|
kind: NetworkAttachmentDefinition
|
||||||
|
metadata:
|
||||||
|
name: lan-net
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
config: '{
|
||||||
|
"cniVersion": "0.3.1",
|
||||||
|
"type": "bridge",
|
||||||
|
"bridge": "br-lan",
|
||||||
|
"ipam": {
|
||||||
|
"type": "static",
|
||||||
|
"addresses": [
|
||||||
|
{
|
||||||
|
"address": "172.168.100.0/24",
|
||||||
|
"gateway": "172.168.100.1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}'
|
20
firewall-s3/vm/ksd/network-definitions/mgmt.yaml
Normal file
20
firewall-s3/vm/ksd/network-definitions/mgmt.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: "k8s.cni.cncf.io/v1"
|
||||||
|
kind: NetworkAttachmentDefinition
|
||||||
|
metadata:
|
||||||
|
name: mgmt-net
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
config: '{
|
||||||
|
"cniVersion": "0.3.1",
|
||||||
|
"type": "bridge",
|
||||||
|
"bridge": "br-mgmt",
|
||||||
|
"ipam": {
|
||||||
|
"type": "static",
|
||||||
|
"addresses": [
|
||||||
|
{
|
||||||
|
"address": "192.168.10.0/24",
|
||||||
|
"gateway": "192.168.10.1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}'
|
77
firewall-s3/vm/ksd/vm/fortigate.yaml
Normal file
77
firewall-s3/vm/ksd/vm/fortigate.yaml
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: fortigate-ksd
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
dataVolumeTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: fortigate-rootdisk-ksd
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: "https://glacier-1.kvant.cloud/ocp-virt-images/sources/fortios_7_6_3.qcow2"
|
||||||
|
#secretRef: s3-virt-credentials
|
||||||
|
storage:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
runStrategy: Always
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: fortigate-ksd
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 1
|
||||||
|
memory:
|
||||||
|
guest: 2Gi
|
||||||
|
features:
|
||||||
|
acpi: {}
|
||||||
|
smm:
|
||||||
|
enabled: true
|
||||||
|
firmware:
|
||||||
|
bootloader:
|
||||||
|
efi:
|
||||||
|
secureBoot: false
|
||||||
|
devices:
|
||||||
|
rng: {}
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
interfaces:
|
||||||
|
- name: wan
|
||||||
|
masquerade: {}
|
||||||
|
ports:
|
||||||
|
- port: 4500
|
||||||
|
- port: 443
|
||||||
|
- port: 22
|
||||||
|
- port: 500
|
||||||
|
- name: mgmt
|
||||||
|
bridge: {}
|
||||||
|
- name: lan
|
||||||
|
bridge: {}
|
||||||
|
disks:
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: rootdisk
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 1
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 1
|
||||||
|
networks:
|
||||||
|
- name: wan
|
||||||
|
pod: {}
|
||||||
|
- name: mgmt
|
||||||
|
multus:
|
||||||
|
networkName: ${TENANT_NAMESPACE}/mgmt-net
|
||||||
|
- name: lan
|
||||||
|
multus:
|
||||||
|
networkName: ${TENANT_NAMESPACE}/lan-net
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk
|
||||||
|
dataVolume:
|
||||||
|
name: fortigate-rootdisk-ksd
|
73
firewall-s3/vm/ksd/vm/strongswan.yaml
Normal file
73
firewall-s3/vm/ksd/vm/strongswan.yaml
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: strongswan
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
running: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: strongswan
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 2
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 1
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 2
|
||||||
|
memory:
|
||||||
|
guest: 2Gi
|
||||||
|
devices:
|
||||||
|
rng: {}
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
disks:
|
||||||
|
- name: containerdisk
|
||||||
|
disk:
|
||||||
|
bus: virtio
|
||||||
|
- name: cloudinitdisk
|
||||||
|
disk:
|
||||||
|
bus: virtio
|
||||||
|
interfaces:
|
||||||
|
- name: wan
|
||||||
|
masquerade: {}
|
||||||
|
ports:
|
||||||
|
- port: 4500
|
||||||
|
- port: 443
|
||||||
|
- port: 22
|
||||||
|
- port: 500
|
||||||
|
- name: mgmt
|
||||||
|
bridge: {}
|
||||||
|
- name: lan
|
||||||
|
bridge: {}
|
||||||
|
networks:
|
||||||
|
- name: wan
|
||||||
|
pod: {}
|
||||||
|
- name: mgmt
|
||||||
|
multus:
|
||||||
|
networkName: ${TENANT_NAMESPACE}/mgmt-net
|
||||||
|
- name: lan
|
||||||
|
multus:
|
||||||
|
networkName: ${TENANT_NAMESPACE}/lan-net
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: containerdisk
|
||||||
|
containerDisk:
|
||||||
|
image: quay.io/containerdisks/ubuntu:22.04
|
||||||
|
- name: cloudinitdisk
|
||||||
|
cloudInitNoCloud:
|
||||||
|
userData: |
|
||||||
|
#cloud-config
|
||||||
|
users:
|
||||||
|
- name: testuser
|
||||||
|
groups: [sudo]
|
||||||
|
sudo: "ALL=(ALL) NOPASSWD:ALL"
|
||||||
|
lock_passwd: false
|
||||||
|
passwd: "$6$oMZf5uou7t0.oAJ1$825Te06yt7JZwHSSj4MGQMjpd87LflANQpajCwIVPASkKZdOJo4L2bAEDDuK.jtu.fsRNc9bZAsYefmoqdN8O1"
|
||||||
|
chpasswd:
|
||||||
|
expire: false
|
||||||
|
ssh_pwauth: true
|
|
@ -3,10 +3,22 @@ kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- vars/ks.yaml
|
- vars/ks.yaml
|
||||||
- repos/ks.yaml
|
- repos/ks.yaml
|
||||||
- echo-server/ks.yaml
|
- network/ks-lb.yaml
|
||||||
|
- firewall-s3/ks-vm.yaml
|
||||||
|
- windows-vm-standard/ks-vm.yaml
|
||||||
|
- windows-vm-standard/ks-pvc.yaml
|
||||||
|
- windows-vm-standard-dev/ks-vm.yaml
|
||||||
|
- windows-vm-standard-dev/ks-pvc.yaml
|
||||||
- ubuntu-vm-1/ks.yaml
|
- ubuntu-vm-1/ks.yaml
|
||||||
- ubuntu-vm-2/ks.yaml
|
- ubuntu-vm-2/ks.yaml
|
||||||
|
- ubuntu-vm-3-john/ks.yaml
|
||||||
|
- container/ks-debug.yaml
|
||||||
- templates/image-server/ks-nginx.yaml
|
- templates/image-server/ks-nginx.yaml
|
||||||
- templates/image-server/ks-pvc.yaml
|
- templates/image-server/ks-pvc.yaml
|
||||||
- templates/windowsserver/ks-dv.yaml
|
- templates/image-server/ks-route.yaml
|
||||||
- templates/windowsserver/ks-flavor.yaml
|
- templates/windowsserver/ks-flavor.yaml
|
||||||
|
- templates/windowsserver-rh/ks-flavor.yaml
|
||||||
|
- postgres/ks.yaml
|
||||||
|
# - windows-vm-standard-john/ks-vm.yaml
|
||||||
|
# - windows-vm-standard-john/ks-pvc.yaml
|
||||||
|
# - windows-vm-standard-john/windows-lb.yaml
|
||||||
|
|
18
network/ks-lb.yaml
Normal file
18
network/ks-lb.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app lb
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./network/loadbalancers
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
29
network/loadbalancers/fortigate-lb.yaml
Normal file
29
network/loadbalancers/fortigate-lb.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fortigate-lb
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: fortigate-lb
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 4500
|
||||||
|
name: ipsec-nat
|
||||||
|
targetPort: 4500
|
||||||
|
protocol: UDP
|
||||||
|
- port: 500
|
||||||
|
name: key-management
|
||||||
|
targetPort: 500
|
||||||
|
protocol: UDP
|
||||||
|
- port: 22
|
||||||
|
name: ssh
|
||||||
|
targetPort: 22
|
||||||
|
protocol: TCP
|
||||||
|
- port: 443
|
||||||
|
name: https
|
||||||
|
targetPort: 443
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
kubevirt.io/domain: fortigate-s3
|
29
network/loadbalancers/windows-lb.yaml
Normal file
29
network/loadbalancers/windows-lb.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: windows-lb
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: windows-lb
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
name: http
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
- port: 443
|
||||||
|
name: https
|
||||||
|
targetPort: 443
|
||||||
|
protocol: TCP
|
||||||
|
- port: 65022
|
||||||
|
name: ssh
|
||||||
|
targetPort: 22
|
||||||
|
protocol: TCP
|
||||||
|
- port: 3389
|
||||||
|
name: rdp
|
||||||
|
targetPort: 3389
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
kubevirt.io/domain: windows-vm-standard
|
122
postgres/app/helmrelease.yaml
Normal file
122
postgres/app/helmrelease.yaml
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: postgres
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: ${TECHNICAL_ACCOUNT}
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: cluster
|
||||||
|
version: 0.3.1
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: cloudnative-pg
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
cleanupOnFail: true
|
||||||
|
remediation:
|
||||||
|
strategy: rollback
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
# check the complete configuration options at
|
||||||
|
# https://raw.githubusercontent.com/cloudnative-pg/charts/refs/tags/cluster-v0.3.1/charts/cluster/values.yaml
|
||||||
|
type: postgresql
|
||||||
|
mode: standalone
|
||||||
|
version:
|
||||||
|
postgresql: "17.5"
|
||||||
|
cluster:
|
||||||
|
instances: 3
|
||||||
|
storage:
|
||||||
|
size: 10Gi
|
||||||
|
# default storage class on ai-2 cluster, on basel or staging you
|
||||||
|
# should use 'ocs-storagecluster-ceph-rbd' instead
|
||||||
|
storageClass: ibm-spectrum-scale-fileset
|
||||||
|
walStorage:
|
||||||
|
# It's not mandatory to split WAL from the main data volume.
|
||||||
|
# However, doing so helps to avoid issues with the main data volume
|
||||||
|
# in cases where WAL exporting to the backup server experiences
|
||||||
|
# issues. For example, in scenarios where there's network congestion
|
||||||
|
# or even failures, the WAL may end up accumulating too much data
|
||||||
|
# to the point where the volume fills up, blocking the cluster from
|
||||||
|
# operating properly.
|
||||||
|
enabled: true
|
||||||
|
size: 10Gi
|
||||||
|
storageClass: ibm-spectrum-scale-fileset
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: 1Gi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
enableSuperuserAccess: true
|
||||||
|
superuserSecret: postgres-superuser
|
||||||
|
affinity:
|
||||||
|
topologyKey: failure-domain.beta.kubernetes.io/zone
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
shared_buffers: 256MB
|
||||||
|
max_connections: "400"
|
||||||
|
initdb:
|
||||||
|
database: app
|
||||||
|
owner: app
|
||||||
|
options: []
|
||||||
|
encoding: UTF8
|
||||||
|
backups:
|
||||||
|
# As indicated by the 'enabled' flag, backups are disabled on
|
||||||
|
# this deployment. But the remaining of the block serves as an
|
||||||
|
# example of how to configure this cluster to export backups to
|
||||||
|
# a S3 bucket hosted on a MinIO server.
|
||||||
|
#
|
||||||
|
# For more information, refer to the helm chart's values.yaml
|
||||||
|
# or the official documentation at
|
||||||
|
# https://cloudnative-pg.io/documentation/1.26/backup/
|
||||||
|
enabled: false
|
||||||
|
endpointURL: https://glacier-1.kvant.cloud
|
||||||
|
provider: s3
|
||||||
|
s3:
|
||||||
|
bucket: phoenix-openshift-backups
|
||||||
|
path: /demo-postgres
|
||||||
|
# Ideally, you will never commit credentials in plain text;
|
||||||
|
# these values are here just for illustration. For a way to
|
||||||
|
# properly load them from kubernetes' secrets, refer to the
|
||||||
|
# commented-ou section 'valuesFrom' placed right below
|
||||||
|
accessKey: your-access-key
|
||||||
|
secretKey: your-secret-key
|
||||||
|
secret:
|
||||||
|
create: true
|
||||||
|
wal:
|
||||||
|
# If exporting to MinIO S3, you may have to disable encryption.
|
||||||
|
# This is how you achieve it
|
||||||
|
encryption: ""
|
||||||
|
data:
|
||||||
|
encryption: ""
|
||||||
|
scheduledBackups:
|
||||||
|
# You can give it any name and change the scheduled time to what
|
||||||
|
# fits your strategy. This serves as an example of how to configure
|
||||||
|
# the cluster to export a daily backup to the S3 bucket using
|
||||||
|
# barman object storage. You can also back up volumes instead.
|
||||||
|
# Check the backup documentation to find more information on
|
||||||
|
# which option suits you best.
|
||||||
|
- name: daily-minio
|
||||||
|
schedule: "@daily"
|
||||||
|
backupOwnerReference: self
|
||||||
|
method: barmanObjectStore
|
||||||
|
retentionPolicy: "180d" # It is mandatory to match this value with the bucket's retention period
|
||||||
|
# valuesFrom:
|
||||||
|
# - kind: Secret
|
||||||
|
# name: postgres-backup-s3 # name of the pre-existing secret that holds the key pair
|
||||||
|
# valuesKey: ACCESS_KEY_ID # name of the key inside the secret that holds the access key value
|
||||||
|
# targetPath: backups.s3.accessKey # path of the configuration that will be assigned the access key value
|
||||||
|
# optional: false
|
||||||
|
# - kind: Secret
|
||||||
|
# name: postgres-backup-s3 # name of the pre-existing secret that holds the key pair
|
||||||
|
# valuesKey: ACCESS_SECRET_KEY # name of the key inside the secret that holds the secret key value
|
||||||
|
# targetPath: backups.s3.secretKey # path of the configuration that will be assigned the secret key value
|
||||||
|
# optional: false
|
|
@ -3,18 +3,21 @@
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: &app echo-server
|
name: &app postgres
|
||||||
namespace: ${TENANT_NAMESPACE}
|
namespace: ${TENANT_NAMESPACE}
|
||||||
spec:
|
spec:
|
||||||
|
targetNamespace: ${TENANT_NAMESPACE}
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
path: ./echo-server/app
|
path: ./postgres/app
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: tenant-repos
|
name: tenant-repos
|
||||||
wait: false
|
wait: true
|
||||||
interval: 30m
|
interval: 10m
|
||||||
retryInterval: 1m
|
retryInterval: 1m
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
dependsOn:
|
||||||
|
- name: vars
|
|
@ -5,5 +5,5 @@ metadata:
|
||||||
namespace: ${TENANT_NAMESPACE}
|
namespace: ${TENANT_NAMESPACE}
|
||||||
spec:
|
spec:
|
||||||
type: oci
|
type: oci
|
||||||
interval: 5m
|
interval: 60m
|
||||||
url: oci://registry-1.docker.io/bitnamicharts
|
url: oci://registry-1.docker.io/bitnamicharts
|
|
@ -3,10 +3,8 @@
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: bjw-s
|
name: cloudnative-pg
|
||||||
namespace: ${TENANT_NAMESPACE}-ns
|
namespace: ${TENANT_NAMESPACE}
|
||||||
spec:
|
spec:
|
||||||
type: oci
|
interval: 5m0s
|
||||||
interval: 5m
|
url: https://cloudnative-pg.github.io/charts
|
||||||
url: oci://ghcr.io/bjw-s/helm
|
|
||||||
|
|
|
@ -15,4 +15,5 @@ spec:
|
||||||
wait: false
|
wait: false
|
||||||
interval: 30m
|
interval: 30m
|
||||||
retryInterval: 1m
|
retryInterval: 1m
|
||||||
|
targetNamespace: ${TENANT_NAMESPACE}
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
|
18
templates/image-server/ks-route.yaml
Normal file
18
templates/image-server/ks-route.yaml
Normal file
|
@ -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
|
|
@ -5,11 +5,11 @@ metadata:
|
||||||
namespace: ${TENANT_NAMESPACE}
|
namespace: ${TENANT_NAMESPACE}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: ${TECHNICAL_ACCOUNT}
|
serviceAccountName: ${TECHNICAL_ACCOUNT}
|
||||||
interval: 5m
|
interval: 10m
|
||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: nginx
|
chart: nginx
|
||||||
version: 20.0.0
|
version: 19.1.1
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: bitnami
|
name: bitnami
|
||||||
|
@ -17,19 +17,14 @@ spec:
|
||||||
values:
|
values:
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
|
||||||
http: 80
|
|
||||||
https: 443
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
hostname: nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud
|
hostname: nginx.${TENANT_DOMAIN}
|
||||||
tls:
|
ingressClassName: external
|
||||||
- hosts:
|
|
||||||
- nginx.${TENANT_DOMAIN}.apps.ai-2.kvant.cloud
|
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
- name: ${TENANT_NAMESPACE}-image-storage
|
- name: ${TENANT_NAMESPACE}-image-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: ${TENANT_NAMESPACE}-image-storage
|
claimName: ${TENANT_NAMESPACE}-image-storage
|
||||||
extraVolumeMounts:
|
extraVolumeMounts:
|
||||||
- name: ${TENANT_NAMESPACE}-image-storage
|
- name: ${TENANT_NAMESPACE}-image-storage
|
||||||
mountPath: /usr/share/nginx/html
|
mountPath: /app
|
||||||
|
|
|
@ -2,11 +2,11 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: ${TENANT_NAMESPACE}-image-storage
|
name: ${TENANT_NAMESPACE}-image-storage
|
||||||
namespace: ${TENANT_NAMESPACE}
|
annotations:
|
||||||
|
helm.sh/resource-policy: keep
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 120Gi
|
storage: 120Gi
|
||||||
storageClassName: ocs-storagecluster-ceph-rbd
|
|
14
templates/image-server/route/http.yaml
Normal file
14
templates/image-server/route/http.yaml
Normal file
|
@ -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: 8080
|
||||||
|
tls:
|
||||||
|
termination: edge
|
||||||
|
insecureEdgeTerminationPolicy: Allow
|
87
templates/windowsserver-rh/flavor/small.yaml
Normal file
87
templates/windowsserver-rh/flavor/small.yaml
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
apiVersion: template.openshift.io/v1
|
||||||
|
kind: Template
|
||||||
|
metadata:
|
||||||
|
name: windows-server-2022-small-redhat
|
||||||
|
namespace: '${TENANT_NAMESPACE}'
|
||||||
|
labels:
|
||||||
|
template.kubevirt.io/type: 'vm'
|
||||||
|
os.template.kubevirt.io/win2k22: 'true'
|
||||||
|
workload.template.kubevirt.io/server: 'true'
|
||||||
|
annotations:
|
||||||
|
name.os.template.kubevirt.io/win2k22: Windows Server 2022
|
||||||
|
description: Windows Server 2022 VM
|
||||||
|
openshift.io/display-name: Windows Server 2022
|
||||||
|
iconClass: icon-windows
|
||||||
|
objects:
|
||||||
|
- apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: windows-server-2022-small-redhat
|
||||||
|
annotations:
|
||||||
|
description: Windows Server 2022 VM example
|
||||||
|
labels:
|
||||||
|
app: windows-server-2022-small-redhat
|
||||||
|
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: windows-server-2022-small-redhat
|
||||||
|
kubevirt.io/size: small
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 1
|
||||||
|
sockets: 1
|
||||||
|
threads: 1
|
||||||
|
devices:
|
||||||
|
disks:
|
||||||
|
- 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: windows-server-2022-small-redhat
|
||||||
|
networks:
|
||||||
|
- name: default
|
||||||
|
pod: {}
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk
|
||||||
|
dataVolume:
|
||||||
|
name: windows-server-2022-small-redhat-dv
|
||||||
|
- apiVersion: cdi.kubevirt.io/v1beta1
|
||||||
|
kind: DataVolume
|
||||||
|
metadata:
|
||||||
|
name: windows-server-2022-small-redhat-dv
|
||||||
|
namespace: '${TENANT_NAMESPACE}'
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: http://nginx.demo.svc.cluster.local:8080/windows-server-2022-uefi-ns.qcow2
|
||||||
|
pvc:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 120Gi
|
||||||
|
storageClassName: ibm-spectrum-scale-fileset
|
18
templates/windowsserver-rh/ks-flavor.yaml
Normal file
18
templates/windowsserver-rh/ks-flavor.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app flavor-rh
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./templates/windowsserver-rh/flavor
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
|
@ -1,15 +0,0 @@
|
||||||
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
|
|
|
@ -2,49 +2,94 @@ apiVersion: template.openshift.io/v1
|
||||||
kind: Template
|
kind: Template
|
||||||
metadata:
|
metadata:
|
||||||
name: windows-server-2022-small
|
name: windows-server-2022-small
|
||||||
namespace: ${TENANT_NAMESPACE}
|
namespace: '${TENANT_NAMESPACE}'
|
||||||
|
labels:
|
||||||
|
template.kubevirt.io/type: 'vm'
|
||||||
|
os.template.kubevirt.io/win2k22: 'true'
|
||||||
|
workload.template.kubevirt.io/server: 'true'
|
||||||
annotations:
|
annotations:
|
||||||
openshift.io/display-name: "Windows Server 2022 VM"
|
name.os.template.kubevirt.io/win2k22: Windows Server 2022
|
||||||
openshift.io/documentation-url: "https://docs.microsoft.com/en-us/windows-server/"
|
description: Windows Server 2022 VM template (Small)
|
||||||
description: "Template for deploying a Windows Server 2022 Virtual Machine on OpenShift with KubeVirt."
|
openshift.io/display-name: Windows Server 2022
|
||||||
tags: virtualmachine,windows,server,2022
|
iconClass: icon-windows
|
||||||
objects:
|
objects:
|
||||||
- apiVersion: kubevirt.io/v1
|
- apiVersion: kubevirt.io/v1
|
||||||
kind: VirtualMachine
|
kind: VirtualMachine
|
||||||
metadata:
|
metadata:
|
||||||
name: ${VM_NAME}
|
name: windows-server-demo
|
||||||
namespace: ${TENANT_NAMESPACE}
|
annotations:
|
||||||
|
description: Windows Server 2022 VM Demo
|
||||||
labels:
|
labels:
|
||||||
app: windows-server
|
app: windows-server-demo
|
||||||
|
vm.kubevirt.io/template: 'windows-server-2022-template'
|
||||||
|
os.template.kubevirt.io/win2k22: 'true'
|
||||||
spec:
|
spec:
|
||||||
running: false
|
running: false
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
annotations:
|
||||||
|
vm.kubevirt.io/flavor: small
|
||||||
|
vm.kubevirt.io/os: win2k22
|
||||||
|
vm.kubevirt.io/workload: server
|
||||||
labels:
|
labels:
|
||||||
kubevirt.io/domain: ${VM_NAME}
|
kubevirt.io/domain: windows-server-demo
|
||||||
|
kubevirt.io/size: small
|
||||||
spec:
|
spec:
|
||||||
domain:
|
domain:
|
||||||
cpu:
|
cpu:
|
||||||
cores: 4
|
cores: 2
|
||||||
|
sockets: 1
|
||||||
|
threads: 1
|
||||||
devices:
|
devices:
|
||||||
disks:
|
disks:
|
||||||
- name: rootdisk
|
- disk:
|
||||||
disk:
|
|
||||||
bus: virtio
|
bus: virtio
|
||||||
|
name: rootdisk
|
||||||
|
interfaces:
|
||||||
|
- masquerade: {}
|
||||||
|
model: virtio
|
||||||
|
name: default
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
rng: {}
|
||||||
|
features:
|
||||||
|
acpi: {}
|
||||||
|
smm:
|
||||||
|
enabled: true
|
||||||
|
firmware:
|
||||||
|
bootloader:
|
||||||
|
efi: {}
|
||||||
memory:
|
memory:
|
||||||
guest: 8Gi
|
guest: 4Gi
|
||||||
|
hostname: windows-server-demo
|
||||||
networks:
|
networks:
|
||||||
- name: default
|
- name: default
|
||||||
pod: {}
|
pod: {}
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
volumes:
|
volumes:
|
||||||
- name: rootdisk
|
- name: rootdisk
|
||||||
persistentVolumeClaim:
|
dataVolume:
|
||||||
claimName: windows-server-datavolume
|
name: windows-server-datavolume-small
|
||||||
|
- apiVersion: cdi.kubevirt.io/v1beta1
|
||||||
|
kind: DataVolume
|
||||||
|
metadata:
|
||||||
|
name: windows-server-datavolume-small
|
||||||
|
namespace: '${TENANT_NAMESPACE}'
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: http://nginx.demo.pub.ai-2.kvant.cloud.apps.ai-2.kvant.cloud/win2022.qcow2
|
||||||
|
pvc:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '${PVC_SIZE}'
|
||||||
parameters:
|
parameters:
|
||||||
- name: windows_server_2022_small
|
#- name: IMAGE_URL
|
||||||
description: Name of the Virtual Machine
|
# 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
|
||||||
|
- name: PVC_SIZE
|
||||||
|
description: Size of the root disk PVC
|
||||||
required: true
|
required: true
|
||||||
- name: NAMESPACE
|
value: 120Gi
|
||||||
description: Namespace where to deploy
|
|
||||||
required: true
|
|
||||||
value: ${TENANT_NAMESPACE}
|
|
||||||
|
|
|
@ -38,11 +38,13 @@ spec:
|
||||||
cloudInitNoCloud:
|
cloudInitNoCloud:
|
||||||
userData: |
|
userData: |
|
||||||
#cloud-config
|
#cloud-config
|
||||||
hostname: ubuntu-vm-1
|
|
||||||
ssh_pwauth: True
|
|
||||||
users:
|
users:
|
||||||
- name: ubuntu
|
- name: testuser
|
||||||
ssh-authorized-keys:
|
groups: [sudo]
|
||||||
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqlhZW/pPLK8zENt3o6tgl0QVinhGAF1sHvajqq3UvI ubuntu
|
sudo: "ALL=(ALL) NOPASSWD:ALL"
|
||||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
lock_passwd: false
|
||||||
shell: /bin/bash
|
passwd: "$6$oMZf5uou7t0.oAJ1$825Te06yt7JZwHSSj4MGQMjpd87LflANQpajCwIVPASkKZdOJo4L2bAEDDuK.jtu.fsRNc9bZAsYefmoqdN8O1"
|
||||||
|
|
||||||
|
chpasswd:
|
||||||
|
expire: false
|
||||||
|
ssh_pwauth: true
|
18
ubuntu-vm-3 john/ks.yaml
Normal file
18
ubuntu-vm-3 john/ks.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app ubuntu-vm-2
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./ubuntu-vm-2/ubuntu
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
48
ubuntu-vm-3 john/ubuntu/ubuntu-vm.yaml
Normal file
48
ubuntu-vm-3 john/ubuntu/ubuntu-vm.yaml
Normal file
|
@ -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-2
|
||||||
|
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-2
|
||||||
|
ssh_pwauth: True
|
||||||
|
users:
|
||||||
|
- name: ubuntu
|
||||||
|
ssh-authorized-keys:
|
||||||
|
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqlhZW/pPLK8zENt3o6tgl0QVinhGAF1sHvajqq3UvI ubuntu
|
||||||
|
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||||
|
shell: /bin/bash
|
9
vars/demo/s3-secret.yaml
Normal file
9
vars/demo/s3-secret.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: s3-virt-credentials
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
accessKeyId: WWozQTdUdHgzbjNOa3NsS2VodzM=
|
||||||
|
secretKey: SUZJRWtSbnJnWDRPcnlNWmtSSjlheG41UlpnSTZhMjBvVW82Tm1lRA==
|
18
windows-vm-standard-dev/ks-pvc.yaml
Normal file
18
windows-vm-standard-dev/ks-pvc.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-pvc-dev
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard-dev/pvc
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
18
windows-vm-standard-dev/ks-vm.yaml
Normal file
18
windows-vm-standard-dev/ks-vm.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-vm-standard-dev
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard-dev/vm
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
12
windows-vm-standard-dev/pvc/datadisk.yaml
Normal file
12
windows-vm-standard-dev/pvc/datadisk.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-datadisk-dev
|
||||||
|
spec:
|
||||||
|
storageClassName: ibm-spectrum-scale-fileset
|
||||||
|
volumeMode: Filesystem
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 50Gi
|
83
windows-vm-standard-dev/vm/server.yaml
Normal file
83
windows-vm-standard-dev/vm/server.yaml
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-standard-dev
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
dataVolumeTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: windows-rootdisk-dev
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: "https://glacier-1.kvant.cloud/ocp-virt-images/sources/windows-server-2022-uefi-ns.qcow2"
|
||||||
|
storage:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 80Gi
|
||||||
|
sourceRef:
|
||||||
|
kind: DataSource
|
||||||
|
name: win2k22
|
||||||
|
namespace: kubevirt-os-images
|
||||||
|
runStrategy: Always
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: windows-vm-standard-dev
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 4
|
||||||
|
memory:
|
||||||
|
guest: 8Gi
|
||||||
|
features:
|
||||||
|
acpi: {}
|
||||||
|
smm:
|
||||||
|
enabled: true
|
||||||
|
firmware:
|
||||||
|
bootloader:
|
||||||
|
efi:
|
||||||
|
secureBoot: true
|
||||||
|
devices:
|
||||||
|
rng: {}
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
interfaces:
|
||||||
|
- name: default
|
||||||
|
masquerade: {}
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
- port: 443
|
||||||
|
- port: 22
|
||||||
|
- port: 3389
|
||||||
|
disks:
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: rootdisk-dev
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: datadisk-dev
|
||||||
|
# - disk:
|
||||||
|
# bus: scsi
|
||||||
|
# name: cloudinitdisk
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
limits:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
networks:
|
||||||
|
- name: default
|
||||||
|
pod: {}
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk-dev
|
||||||
|
dataVolume:
|
||||||
|
name: windows-rootdisk-dev
|
||||||
|
- name: datadisk-dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: windows-vm-datadisk-dev
|
||||||
|
#- name: cloudinitdisk
|
||||||
|
# cloudInitNoCloud:
|
||||||
|
# secretRef:
|
||||||
|
# name: windows-cloud-init
|
18
windows-vm-standard-john/ks-pvc.yaml
Normal file
18
windows-vm-standard-john/ks-pvc.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-pvc-john
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard-john/pvc
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
18
windows-vm-standard-john/ks-vm.yaml
Normal file
18
windows-vm-standard-john/ks-vm.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-vm-standard-john
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard-john/vm
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
12
windows-vm-standard-john/pvc/datadisk.yaml
Normal file
12
windows-vm-standard-john/pvc/datadisk.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-datadisk-john
|
||||||
|
spec:
|
||||||
|
storageClassName: ibm-spectrum-scale-fileset
|
||||||
|
volumeMode: Filesystem
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 200Gi
|
82
windows-vm-standard-john/vm/server.yaml
Normal file
82
windows-vm-standard-john/vm/server.yaml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-standard-john
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
dataVolumeTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: windows-rootdisk-john
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: http://nginx.demo.svc.cluster.local:80/windows-server-2022-uefi-ns.qcow2
|
||||||
|
storage:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 80Gi
|
||||||
|
# sourceRef:
|
||||||
|
# kind: DataSource
|
||||||
|
# name: win2k22
|
||||||
|
# namespace: openshift-virtualization-os-images
|
||||||
|
runStrategy: Always
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: windows-vm-standard-john
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 4
|
||||||
|
memory:
|
||||||
|
guest: 8Gi
|
||||||
|
features:
|
||||||
|
acpi: {}
|
||||||
|
smm:
|
||||||
|
enabled: true
|
||||||
|
firmware:
|
||||||
|
bootloader:
|
||||||
|
efi: {}
|
||||||
|
devices:
|
||||||
|
rng: {}
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
interfaces:
|
||||||
|
- name: default
|
||||||
|
masquerade: {}
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
- port: 443
|
||||||
|
- port: 22
|
||||||
|
- port: 3389
|
||||||
|
disks:
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: rootdisk-john
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: datadisk-john
|
||||||
|
# - disk:
|
||||||
|
# bus: scsi
|
||||||
|
# name: cloudinitdisk
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
limits:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
networks:
|
||||||
|
- name: default
|
||||||
|
pod: {}
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk-john
|
||||||
|
dataVolume:
|
||||||
|
name: windows-rootdisk-john
|
||||||
|
- name: datadisk-john
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: windows-vm-datadisk-john
|
||||||
|
#- name: cloudinitdisk
|
||||||
|
# cloudInitNoCloud:
|
||||||
|
# secretRef:
|
||||||
|
# name: windows-cloud-init
|
29
windows-vm-standard-john/windows-lb.yaml
Normal file
29
windows-vm-standard-john/windows-lb.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: windows-lb-john
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: windows-lb-john
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
name: http
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
- port: 443
|
||||||
|
name: https
|
||||||
|
targetPort: 443
|
||||||
|
protocol: TCP
|
||||||
|
- port: 65022
|
||||||
|
name: ssh
|
||||||
|
targetPort: 22
|
||||||
|
protocol: TCP
|
||||||
|
- port: 3389
|
||||||
|
name: rdp
|
||||||
|
targetPort: 3389
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
kubevirt.io/domain: windows-vm-standard-john
|
18
windows-vm-standard/ks-pvc.yaml
Normal file
18
windows-vm-standard/ks-pvc.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-pvc
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard/pvc
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
18
windows-vm-standard/ks-vm.yaml
Normal file
18
windows-vm-standard/ks-vm.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app windows-vm-standard
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./windows-vm-standard/vm
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
12
windows-vm-standard/pvc/datadisk.yaml
Normal file
12
windows-vm-standard/pvc/datadisk.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-datadisk
|
||||||
|
spec:
|
||||||
|
storageClassName: ibm-spectrum-scale-fileset
|
||||||
|
volumeMode: Filesystem
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 200Gi
|
82
windows-vm-standard/vm/server.yaml
Normal file
82
windows-vm-standard/vm/server.yaml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: windows-vm-standard
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
dataVolumeTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: windows-rootdisk
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: http://nginx.demo.svc.cluster.local:8080/windows-server-2022-uefi-ns.qcow2
|
||||||
|
storage:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 80Gi
|
||||||
|
sourceRef:
|
||||||
|
kind: DataSource
|
||||||
|
name: win2k22
|
||||||
|
namespace: kubevirt-os-images
|
||||||
|
runStrategy: Always
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: windows-vm-standard
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: 4
|
||||||
|
memory:
|
||||||
|
guest: 8Gi
|
||||||
|
features:
|
||||||
|
acpi: {}
|
||||||
|
smm:
|
||||||
|
enabled: true
|
||||||
|
firmware:
|
||||||
|
bootloader:
|
||||||
|
efi: {}
|
||||||
|
devices:
|
||||||
|
rng: {}
|
||||||
|
networkInterfaceMultiqueue: true
|
||||||
|
interfaces:
|
||||||
|
- name: default
|
||||||
|
masquerade: {}
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
- port: 443
|
||||||
|
- port: 22
|
||||||
|
- port: 3389
|
||||||
|
disks:
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: rootdisk
|
||||||
|
- disk:
|
||||||
|
bus: sata
|
||||||
|
name: datadisk
|
||||||
|
# - disk:
|
||||||
|
# bus: scsi
|
||||||
|
# name: cloudinitdisk
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
limits:
|
||||||
|
memory: 8Gi
|
||||||
|
cpu: 4
|
||||||
|
networks:
|
||||||
|
- name: default
|
||||||
|
pod: {}
|
||||||
|
terminationGracePeriodSeconds: 180
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk
|
||||||
|
dataVolume:
|
||||||
|
name: windows-rootdisk
|
||||||
|
- name: datadisk
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: windows-vm-datadisk
|
||||||
|
#- name: cloudinitdisk
|
||||||
|
# cloudInitNoCloud:
|
||||||
|
# secretRef:
|
||||||
|
# name: windows-cloud-init
|
Loading…
Add table
Add a link
Reference in a new issue