Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.12
1.3.13
4 changes: 4 additions & 0 deletions deployment-package/usb/akri-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ udev:
enabled: true
# nodeSelectors:
# kubernetes.io/os: linux

# Disable the upstream cleanup hook to prevent bitnami/kubectl:latest ImagePullBackOff
cleanupHook:
enabled: false
6 changes: 3 additions & 3 deletions deployment-package/usb/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ schemaVersion: "0.1"
$schema: "https://schema.intel.com/catalog.orchestrator/0.1/schema"

name: akri
version: 0.13.10
version: 0.13.11
description: "akri base application"
kind: extension

Expand All @@ -25,13 +25,13 @@ schemaVersion: "0.1"
$schema: "https://schema.intel.com/catalog.orchestrator/0.1/schema"

name: usb-device-plugin
version: 1.1.3
version: 1.1.4
description: "Exposes USB devices to the k8s cluster"
kind: extension

helmRegistry: "intel-rs-helm"
chartName: "edge-orch/en/charts/akri"
chartVersion: 1.1.1
chartVersion: 1.1.2

profiles:
- name: default
Expand Down
6 changes: 3 additions & 3 deletions deployment-package/usb/deployment-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ $schema: "https://schema.intel.com/catalog.orchestrator/0.1/schema"

name: "usb"
description: "Brings USB allocation for containers/VMs running on k8s cluster"
version: 0.4.4
version: 0.4.5
forbidsMultipleDeployments: true
kind: extension

applications:
- name: akri
version: 0.13.10
version: 0.13.11
- name: usb-device-plugin
version: 1.1.3
version: 1.1.4

defaultNamespaces:
usb-device-plugin: akri
Expand Down
2 changes: 1 addition & 1 deletion helm/akri/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.1
version: 1.1.2
119 changes: 119 additions & 0 deletions helm/akri/templates/pre-deletion-hook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
rules:
- apiGroups: [""]
resources: ["pods", "services"]
verbs: [ "delete", "get", "watch", "list" ]
- apiGroups: ["apps"]
resources: ["deployments", "daemonsets"]
verbs: [ "delete", "get", "watch", "list" ]
- apiGroups: ["akri.sh"]
resources: ["configurations", "instances"]
verbs: [ "delete", "get", "watch", "list" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: akri-pre-deletion
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
rules:
- apiGroups: ["akri.sh"]
resources: ["configurations", "instances"]
verbs: ["delete", "get", "watch", "list"]
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
verbs: ["delete", "get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
subjects:
- kind: ServiceAccount
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: akri-pre-deletion
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: akri-pre-deletion
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: akri-pre-deletion
subjects:
- kind: ServiceAccount
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: akri-pre-deletion
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-weight": "10"
spec:
template:
spec:
serviceAccountName: akri-pre-deletion
containers:
- name: kubectl
image: {{ .Values.kubectl.image | default "bitnamilegacy/kubectl:1.31.3" }}
imagePullPolicy: IfNotPresent
command: ["sh", "-e", "-c"]
args:
- |
echo "Cleaning up Akri resources..."
# Remove finalizers from configurations to allow deletion
for config in $(kubectl get configurations.akri.sh --all-namespaces -o name 2>/dev/null || true); do
kubectl patch $config -p '{"metadata":{"finalizers":null}}' --type=merge 2>/dev/null || true
done
# Remove finalizers from instances
for instance in $(kubectl get instances.akri.sh --all-namespaces -o name 2>/dev/null || true); do
kubectl patch $instance -p '{"metadata":{"finalizers":null}}' --type=merge 2>/dev/null || true
done
# Now delete resources
kubectl delete configurations.akri.sh --all --all-namespaces --timeout=10s --ignore-not-found=true || true
kubectl delete instances.akri.sh --all --all-namespaces --timeout=10s --ignore-not-found=true || true
kubectl delete deployments -n {{ .Release.Namespace }} -l app.kubernetes.io/name=akri --timeout=10s --ignore-not-found=true || true
kubectl delete daemonsets -n {{ .Release.Namespace }} -l app.kubernetes.io/name=akri --timeout=10s --ignore-not-found=true || true
kubectl delete services -n {{ .Release.Namespace }} -l app.kubernetes.io/name=akri --timeout=10s --ignore-not-found=true || true
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io -l app.kubernetes.io/name=akri --timeout=10s --ignore-not-found=true || true
echo "Akri cleanup completed!"
restartPolicy: OnFailure
5 changes: 5 additions & 0 deletions helm/akri/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ extensionImages:
- "ghcr.io/project-akri/akri/controller:v0.12.20"
- "ghcr.io/project-akri/akri/webhook-configuration:v0.12.20"
- "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1"
- "bitnamilegacy/kubectl:1.31.3"

# kubectl image for pre-deletion hook
kubectl:
image: "bitnamilegacy/kubectl:1.31.3"
4 changes: 2 additions & 2 deletions manifest/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---
metadata:
schemaVersion: 0.3.0
release: 1.3.12
release: 1.3.13
lpke:
deploymentPackages:
- dpkg: edge-orch/en/file/cert-manager
Expand All @@ -23,7 +23,7 @@ lpke:
- dpkg: edge-orch/en/file/trusted-compute
version: 0.5.7
- dpkg: edge-orch/en/file/usb
version: 0.4.4
version: 0.4.5
- dpkg: edge-orch/en/file/virtualization
version: 0.5.10
- dpkg: edge-orch/en/file/observability
Expand Down
Loading