@@ -104,7 +104,7 @@ data:
104104 image: ghcr.io/i-am-bee/alpine/git:v2.49.1
105105 command: [ "/bin/sh" ]
106106 env:
107- - name: GIT_HOST_TOKEN
107+ - name: GIT_TOKEN
108108 valueFrom:
109109 secretKeyRef:
110110 name: beeai-platform-secret
@@ -115,14 +115,14 @@ data:
115115 - |
116116 echo "Cloning repository..."
117117 # Check if GitHub token is available for this host
118- if [ -n "$GIT_HOST_TOKEN " ]; then
118+ if [ -n "$GIT_TOKEN " ]; then
119119 echo "Using authenticated clone for {{`{{ git_host }}`}}"
120120 else
121121 echo "Using unauthenticated clone for {{`{{ git_host }}`}}"
122122 fi
123123 git clone --depth 1 \
124124 --revision {{`{{ git_ref }}`}} \
125- "https://$GIT_HOST_TOKEN @{{`{{ git_host }}`}}/{{`{{ git_org }}`}}/{{`{{ git_repo }}`}}.git" \
125+ "https://$GIT_TOKEN @{{`{{ git_host }}`}}/{{`{{ git_org }}`}}/{{`{{ git_repo }}`}}.git" \
126126 /tmp/repo
127127 mv "/tmp/repo/{{`{{ git_path }}`}}"/* /workspace/ 2>/dev/null || true
128128 mv "/tmp/repo/{{`{{ git_path }}`}}"/.[^.]* /workspace/ 2>/dev/null || true
@@ -131,7 +131,8 @@ data:
131131 volumeMounts:
132132 - name: workspace
133133 mountPath: /workspace
134- # Build image
134+ # Build image with BuildKit
135+ {{- if eq .Values.providerBuilds.buildBackend "buildkit" }}
135136 - name: buildkit
136137 image: ghcr.io/i-am-bee/moby/buildkit:v0.24.0-rootless
137138 env:
@@ -157,8 +158,6 @@ data:
157158 - type=inline
158159 - --import-cache
159160 - type=registry,ref={{`{{destination}}`}}{{- if .Values.providerBuilds.buildRegistry.insecure }},registry.insecure=true{{- end }}
160- # To push the image to a registry, add
161- # `--output type=image,name=docker.io/username/image,push=true`
162161 securityContext:
163162 # Needs Kubernetes >= 1.19
164163 seccompProfile:
@@ -182,6 +181,45 @@ data:
182181 mountPath: /docker/config.json
183182 subPath: .dockerconfigjson
184183 readOnly: true
184+ {{- else if eq .Values.providerBuilds.buildBackend "kaniko" }}
185+ # Build image with Kaniko (no securityContext required)
186+ - name: kaniko-build
187+ image: ghcr.io/kaniko-build/dist/chainguard-dev-kaniko/executor:v1.25.2-slim
188+ args:
189+ - --context=/workspace
190+ - --dockerfile=Dockerfile
191+ - --no-push
192+ - --tar-path=/tmp/image.tar
193+ volumeMounts:
194+ - name: workspace
195+ mountPath: /workspace
196+ - name: image-tar
197+ mountPath: /tmp
198+ # Main container: Step 3 Push the intermediary image
199+ - name: crane-push
200+ image: ghcr.io/i-am-bee/alpine/crane:0.20.6
201+ args:
202+ - push
203+ - /tmp/image.tar
204+ - {{`{{ destination }}`}}
205+ {{- if .Values.providerBuilds.buildRegistry.insecure }}
206+ - --insecure
207+ {{- end }}
208+ volumeMounts:
209+ - name: image-tar
210+ mountPath: /tmp
211+ - name: docker-config
212+ mountPath: /root/.docker/config.json
213+ subPath: .dockerconfigjson
214+ readOnly: true
215+ resources:
216+ requests:
217+ memory: "256Mi"
218+ cpu: "200m"
219+ limits:
220+ memory: "512Mi"
221+ cpu: "500m"
222+ {{- end }}
185223 - name: run-agent
186224 image: "{{`{{ destination }}`}}"
187225 restartPolicy: Always # This makes it a daemon sidecar container
@@ -247,8 +285,13 @@ data:
247285 volumes:
248286 - name: workspace
249287 emptyDir: { }
288+ {{- if eq .Values.providerBuilds.buildBackend "buildkit" }}
250289 - name: buildkitd
251290 emptyDir: { }
291+ {{- else if eq .Values.providerBuilds.buildBackend "kaniko" }}
292+ - name: image-tar
293+ emptyDir: { }
294+ {{- end }}
252295 - name: docker-config
253296 secret:
254297 secretName: {{ .Values.providerBuilds.buildRegistry.secretName }}
0 commit comments