From ece3dddfe6e014529efd86c59fdbb2c5d0193e4c Mon Sep 17 00:00:00 2001 From: Richard Robert Reitz Date: Mon, 27 Oct 2025 16:32:57 +0100 Subject: [PATCH] feat(edge): Added ubuntu buildkit edge v1 (running) and v2 (not running) example --- .../ubuntu-buildkit/EdgeConnectConfig_v1.yaml | 29 ++++++++++ .../ubuntu-buildkit/EdgeConnectConfig_v2.yaml | 29 ++++++++++ .../ubuntu-buildkit/k8s-deployment.yaml | 57 +++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v1.yaml create mode 100644 sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v2.yaml create mode 100644 sdk/examples/ubuntu-buildkit/k8s-deployment.yaml diff --git a/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v1.yaml b/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v1.yaml new file mode 100644 index 0000000..9710327 --- /dev/null +++ b/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v1.yaml @@ -0,0 +1,29 @@ +# Is there a swagger file for the new EdgeConnect API? +# How does it differ from the EdgeXR API? +kind: edgeconnect-deployment +metadata: + name: "edge-ubuntu-buildkit" # name could be used for appName + appVersion: "1.0.0" + organization: "edp2" +spec: + # dockerApp: # Docker is OBSOLETE + # appVersion: "1.0.0" + # manifestFile: "./docker-compose.yaml" + # image: "https://registry-1.docker.io/library/nginx:latest" + k8sApp: + manifestFile: "./k8s-deployment.yaml" + infraTemplate: + - region: "EU" + cloudletOrg: "TelekomOP" + cloudletName: "Munich" + flavorName: "EU.small" + network: + outboundConnections: + - protocol: "tcp" + portRangeMin: 80 + portRangeMax: 80 + remoteCIDR: "0.0.0.0/0" + - protocol: "tcp" + portRangeMin: 443 + portRangeMax: 443 + remoteCIDR: "0.0.0.0/0" diff --git a/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v2.yaml b/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v2.yaml new file mode 100644 index 0000000..9fb80df --- /dev/null +++ b/sdk/examples/ubuntu-buildkit/EdgeConnectConfig_v2.yaml @@ -0,0 +1,29 @@ +# Is there a swagger file for the new EdgeConnect API? +# How does it differ from the EdgeXR API? +kind: edgeconnect-deployment +metadata: + name: "edge-ubuntu-buildkit" # name could be used for appName + appVersion: "1" + organization: "edp2-orca" +spec: + # dockerApp: # Docker is OBSOLETE + # appVersion: "1.0.0" + # manifestFile: "./docker-compose.yaml" + # image: "https://registry-1.docker.io/library/nginx:latest" + k8sApp: + manifestFile: "./k8s-deployment.yaml" + infraTemplate: + - region: "US" + cloudletOrg: "TelekomOp" + cloudletName: "gardener-shepherd-test" + flavorName: "defualt" + network: + outboundConnections: + - protocol: "tcp" + portRangeMin: 80 + portRangeMax: 80 + remoteCIDR: "0.0.0.0/0" + - protocol: "tcp" + portRangeMin: 443 + portRangeMax: 443 + remoteCIDR: "0.0.0.0/0" diff --git a/sdk/examples/ubuntu-buildkit/k8s-deployment.yaml b/sdk/examples/ubuntu-buildkit/k8s-deployment.yaml new file mode 100644 index 0000000..d4d3dd8 --- /dev/null +++ b/sdk/examples/ubuntu-buildkit/k8s-deployment.yaml @@ -0,0 +1,57 @@ +# Add remote buildx builder: +# docker buildx create --use --name sidecar tcp://127.0.0.1:1234 + +# Run build: +# docker buildx build . + +apiVersion: v1 +kind: Service +metadata: + name: ubuntu-runner + labels: + run: ubuntu-runner +spec: + type: LoadBalancer + ports: + - name: tcp80 + protocol: TCP + port: 80 + targetPort: 80 + selector: + run: ubuntu-runner +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: ubuntu-runner + name: ubuntu-runner +spec: + replicas: 1 + selector: + matchLabels: + app: ubuntu-runner + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: ubuntu-runner + annotations: + container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined + spec: + containers: + - name: ubuntu + image: edp.buildth.ing/devfw-cicd/catthehacker/ubuntu:act-22.04-amd64 + command: + - sleep + - 7d + - args: + - --allow-insecure-entitlement=network.host + - --oci-worker-no-process-sandbox + - --addr + - tcp://127.0.0.1:1234 + image: moby/buildkit:v0.25.1-rootless + imagePullPolicy: IfNotPresent + name: buildkitd