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

Allow all containers in the kubeflow namespace to run as non root #1756

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- name: hooks
mountPath: /hooks
ports:
- containerPort: 80
- containerPort: 8080
volumes:
- name: hooks
configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
- name: http
port: 80
protocol: TCP
targetPort: 80
targetPort: 8080
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ def do_POST(self):
self.wfile.write(bytes(json.dumps(desired), 'utf-8'))


HTTPServer(("", 80), Controller).serve_forever()
HTTPServer(("", 8080), Controller).serve_forever()
10 changes: 8 additions & 2 deletions apps/pipeline/upstream/mysql/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ spec:
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: mysql
containers:
- name: mysql
- args:
- --datadir
- /var/lib/mysql/datadir
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
image: mysql:5.6
image: mysql:5.7
imagePullPolicy: IfNotPresent
name: mysql
ports:
- containerPort: 3306
name: mysql
protocol: TCP
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-persistent-storage
Expand Down
1 change: 1 addition & 0 deletions apps/pipeline/upstream/mysql/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- deployment.yaml
- service.yaml
- persistent-volume-claim.yaml
- serviceaccount.yaml
configMapGenerator:
- name: pipeline-mysql-parameters
envs:
Expand Down
4 changes: 4 additions & 0 deletions apps/pipeline/upstream/mysql/base/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: mysql
4 changes: 2 additions & 2 deletions contrib/metadata/overlays/db/metadata-db-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: db-container
image: mysql:8.0.3
image: mysql:8.0
args:
- --datadir
- /var/lib/mysql/datadir
Expand All @@ -38,7 +38,7 @@ spec:
command:
- "/bin/bash"
- "-c"
- "mysql -D $$MYSQL_DATABASE -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1'"
- "mysql --database=$MYSQL_DATABASE --password=$MYSQL_ROOT_PASSWORD --user=$MYSQL_USER_NAME -e 'SELECT 1'"
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- op: replace
path: /spec/template/spec/containers/0/readinessProbe/exec/command/2
value: "mysql -D $$MYSQL_DATABASE -u$$MYSQL_USER_NAME -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1'"
value: "mysql --database=$MYSQL_DATABASE --password=$MYSQL_ROOT_PASSWORD --user=$MYSQL_USER_NAME -e 'SELECT 1"
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ spec:
command:
- /bin/bash
- -c
- mysql -D $$MYSQL_DATABASE -u$$MYSQL_USER_NAME -p$$MYSQL_ROOT_PASSWORD
-e 'SELECT 1'
- mysql --database=$MYSQL_DATABASE --password=$MYSQL_ROOT_PASSWORD --user=$MYSQL_USER_NAME -e 'SELECT 1'
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
Expand Down