generated from phoenix-oss/tenant-tpl
Added Template and nginx for Image-hosting
This commit is contained in:
parent
d2b911dd2d
commit
3f1180edae
10 changed files with 199 additions and 1 deletions
18
templates/image-server/ks-nginx.yaml
Normal file
18
templates/image-server/ks-nginx.yaml
Normal file
|
@ -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
|
18
templates/image-server/ks-pvc.yaml
Normal file
18
templates/image-server/ks-pvc.yaml
Normal file
|
@ -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
|
35
templates/image-server/nginx/helmrelease.yaml
Normal file
35
templates/image-server/nginx/helmrelease.yaml
Normal file
|
@ -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
|
12
templates/image-server/pvc/image-storage.yaml
Normal file
12
templates/image-server/pvc/image-storage.yaml
Normal file
|
@ -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
|
16
templates/windowsserver/dv/windows-1-dv.yaml
Normal file
16
templates/windowsserver/dv/windows-1-dv.yaml
Normal file
|
@ -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
|
50
templates/windowsserver/flavor/small.yaml
Normal file
50
templates/windowsserver/flavor/small.yaml
Normal file
|
@ -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}
|
18
templates/windowsserver/ks-dv.yaml
Normal file
18
templates/windowsserver/ks-dv.yaml
Normal file
|
@ -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
|
18
templates/windowsserver/ks-flavor.yaml
Normal file
18
templates/windowsserver/ks-flavor.yaml
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue