File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ RUN touch /etc/subgid /etc/subuid \
77
88ENV BUILDAH_ISOLATION=chroot
99
10+ ARG BENTO_USER=bentoml
11+ ARG BENTO_USER_UID=1034
12+ ARG BENTO_USER_GID=1034
13+ RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
14+
1015USER build
1116WORKDIR /home/build
1217
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ echo "✅ cert-manager is working properly"
140140helm repo add twuni https://helm.twun.io
141141helm repo update twuni
142142echo " 🤖 installing docker-registry..."
143- helm upgrade --install docker-registry twuni /docker-registry -n ${namespace}
143+ helm upgrade --install docker-registry ./helm /docker-registry -n ${namespace}
144144
145145echo " ⏳ waiting for docker-registry to be ready..."
146146kubectl -n ${namespace} wait --for=condition=ready --timeout=600s pod -l app=docker-registry
@@ -155,6 +155,8 @@ metadata:
155155 namespace: ${namespace}
156156 labels:
157157 app: docker-private-registry-proxy
158+ annotations:
159+ openshift.io/scc: hostnetwork
158160spec:
159161 selector:
160162 matchLabels:
@@ -165,6 +167,10 @@ spec:
165167 labels:
166168 app: docker-private-registry-proxy
167169 spec:
170+ securityContext:
171+ runAsNonRoot: true
172+ seccompProfile:
173+ type: RuntimeDefault
168174 containers:
169175 - args:
170176 - tcp
@@ -181,6 +187,11 @@ spec:
181187 limits:
182188 cpu: 100m
183189 memory: 100Mi
190+ securityContext:
191+ allowPrivilegeEscalation: false
192+ capabilities:
193+ drop:
194+ - ALL
184195EOF
185196
186197echo " ⏳ waiting for docker-private-registry-proxy to be ready..."
Original file line number Diff line number Diff line change 22
33set -xe
44
5- kubectl create ns yatai-system
6- kubectl create ns yatai-image-builder
5+ kubectl create ns yatai-system || true
6+ kubectl create ns yatai-image-builder || true
77kubectl create ns yatai || true
88
99echo " 🚀 Creating AWS Secret Access Key..."
10- kubectl create secret generic aws-secret-access-key --from-literal=AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} --namespace yatai-image-builder
10+ kubectl create secret generic aws-secret-access-key --from-literal=AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} --namespace yatai-image-builder || true
1111echo " 🚀 Installing yatai-image-builder..."
1212YATAI_ENDPOINT=' empty' USE_LOCAL_HELM_CHART=true UPGRADE_CRDS=false AWS_SECRET_ACCESS_KEY_EXISTING_SECRET_NAME=aws-secret-access-key AWS_SECRET_ACCESS_KEY_EXISTING_SECRET_KEY=AWS_SECRET_ACCESS_KEY bash ./scripts/quick-install-yatai-image-builder.sh
1313echo " yatai-image-builder helm release values:"
You can’t perform that action at this time.
0 commit comments