Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add CDI #1235

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Feat: Add CDI #1235

merged 2 commits into from
Mar 23, 2024

Conversation

rodent1
Copy link
Owner

@rodent1 rodent1 commented Mar 23, 2024

This pull request adds CDI to kubevirt

@ro-bott ro-bott bot added area/kubernetes Changes made in the kubernetes directory cluster/main labels Mar 23, 2024
@ro-bott
Copy link
Contributor

ro-bott bot commented Mar 23, 2024

--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Namespace: flux-system/cdi

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Namespace: flux-system/cdi

@@ -0,0 +1,12 @@

+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  labels:
+    cdi.kubevirt.io: ''
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+    kustomize.toolkit.fluxcd.io/prune: disabled
+    volsync.backube/privileged-movers: 'true'
+  name: cdi
+
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Provider: cdi/alert-manager

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Provider: cdi/alert-manager

@@ -0,0 +1,13 @@

+---
+apiVersion: notification.toolkit.fluxcd.io/v1beta3
+kind: Provider
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: alert-manager
+  namespace: cdi
+spec:
+  address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/
+  type: alertmanager
+
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Alert: cdi/alert-manager

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Alert: cdi/alert-manager

@@ -0,0 +1,23 @@

+---
+apiVersion: notification.toolkit.fluxcd.io/v1beta3
+kind: Alert
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: alert-manager
+  namespace: cdi
+spec:
+  eventSeverity: error
+  eventSources:
+  - kind: HelmRelease
+    name: '*'
+  exclusionList:
+  - error.*lookup github\.com
+  - error.*lookup raw\.githubusercontent\.com
+  - dial.*tcp.*timeout
+  - waiting.*socket
+  providerRef:
+    name: alert-manager
+  suspend: false
+
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/kubevirt-cdi

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/kubevirt-cdi

@@ -0,0 +1,57 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: kubevirt-cdi
+  namespace: flux-system
+spec:
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  dependsOn:
+  - name: kubevirt
+  - name: rook-ceph-cluster
+  interval: 30m
+  patches:
+  - patch: |
+      $patch: delete
+      apiVersion: v1
+      kind: Namespace
+      metadata:
+        name: cdi
+    target:
+      kind: Namespace
+      name: cdi
+  - patch: |
+      apiVersion: cdi.kubevirt.io/v1beta1
+      kind: CDI
+      metadata:
+        name: not-used
+      spec:
+        config:
+          podResourceRequirements:
+            limits:
+              memory: 1Gi
+    target:
+      group: cdi.kubevirt.io
+      kind: CDI
+  path: ./deploy
+  postBuild:
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: kubevirt-cdi
+  targetNamespace: cdi
+  timeout: 5m
+  wait: true
+
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Service: cdi/cdi-uploadproxy

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Service: cdi/cdi-uploadproxy

@@ -0,0 +1,18 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    cdi.kubevirt.io: cdi-uploadproxy
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: cdi-uploadproxy
+  namespace: cdi
+spec:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 443
+  selector:
+    cdi.kubevirt.io: cdi-uploadproxy
+
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Ingress: cdi/cdi-uploadproxy

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Ingress: cdi/cdi-uploadproxy

@@ -0,0 +1,28 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: cdi-uploadproxy
+  namespace: cdi
+spec:
+  ingressClassName: nginx-internal
+  rules:
+  - host: cdi.${SECRET_DOMAIN}
+    http:
+      paths:
+      - backend:
+          service:
+            name: cdi-uploadproxy
+            port:
+              number: 443
+        path: /
+        pathType: Prefix
+  tls:
+  - hosts:
+    - cdi.${SECRET_DOMAIN}
+

@rodent1 rodent1 merged commit 3ae2cf2 into main Mar 23, 2024
5 of 6 checks passed
@rodent1 rodent1 deleted the cdi branch March 23, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant