Vtadmin volume mount not effected
dk-lockdown opened this issue · comments
vtadmin-web mount secret example-zone1-vtadmin-webconfig-1c814ad7
, and the secret example-zone1-vtadmin-webconfig-1c814ad7
config.js value is:
window.env = {
'REACT_APP_VTADMIN_API_ADDRESS': "http://10.253.178.197:14000/",
'REACT_APP_FETCH_CREDENTIALS': "omit",
'REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false,
'REACT_APP_BUGSNAG_API_KEY': "",
'REACT_APP_DOCUMENT_TITLE': "",
'REACT_APP_READONLY_MODE': false,
};
but, in the vtadmin pod, /var/www/config/config.js
is:
window.env = {
'REACT_APP_VTADMIN_API_ADDRESS': "",
'REACT_APP_FETCH_CREDENTIALS': "omit",
'REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': true,
'REACT_APP_BUGSNAG_API_KEY': "",
'REACT_APP_DOCUMENT_TITLE': "",
'REACT_APP_READONLY_MODE': false,
};
volume mount not success, i think this might be releated to vtadmin base image nginxinc/nginx-unprivileged:1.22
Deployment of Vtadmin
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "7"
creationTimestamp: "2023-03-08T08:20:47Z"
generation: 7
labels:
planetscale.com/cell: zone1
planetscale.com/cluster: example
planetscale.com/component: vtadmin
name: example-zone1-vtadmin-c03d7eae
namespace: default
ownerReferences:
- apiVersion: planetscale.com/v2
blockOwnerDeletion: true
controller: true
kind: VitessCluster
name: example
uid: dcc341e7-9cb1-4587-bd01-fd932982cea3
resourceVersion: "2999085"
uid: 8d6272ed-4e78-4d95-9d55-23986cf5900b
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
planetscale.com/cell: zone1
planetscale.com/cluster: example
planetscale.com/component: vtadmin
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
planetscale.com/cell: zone1
planetscale.com/cluster: example
planetscale.com/component: vtadmin
spec:
containers:
- args:
- --addr=:15001
- --alsologtostderr=true
- --cluster-config=/vt/secrets/cluster-config/cluster-config.yaml
- --grpc-tracing=true
- --http-origin=*
- --http-tracing=true
- --logtostderr=true
- --rbac=true
- --rbac-config=/vt/secrets/rbac-config/rbac.yaml
- --tracer=opentracing-jaeger
command:
- /vt/bin/vtadmin
image: localhost/vitess/vtadmin:latest
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 30
httpGet:
path: /health
port: api
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: vtadmin-api
ports:
- containerPort: 15001
name: api
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: api
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
securityContext:
runAsUser: 999
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /vt/secrets/rbac-config
name: rbac-config-secret
readOnly: true
- mountPath: /vt/secrets/discovery-config
name: discovery-config-secret
readOnly: true
- mountPath: /vt/secrets/cluster-config
name: cluster-config-secret
readOnly: true
- args:
- nginx
- -g
- daemon off;
command:
- /docker-entrypoint.sh
env:
- name: VTADMIN_WEB_PORT
value: "15000"
image: localhost/vitess/vtadmin:latest
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 30
httpGet:
path: /
port: web
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: vtadmin-web
ports:
- containerPort: 15000
name: web
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: web
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
securityContext:
runAsUser: 999
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/www/config
name: config-js-secret
readOnly: true
dnsPolicy: ClusterFirst
priorityClassName: vitess
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: rbac-config-secret
secret:
defaultMode: 292
items:
- key: rbac.yaml
path: rbac.yaml
secretName: example-cluster-config
- name: discovery-config-secret
secret:
defaultMode: 292
items:
- key: discovery.json
path: discovery.json
secretName: example-zone1-vtadmin-discovery-26fba126
- name: cluster-config-secret
secret:
defaultMode: 292
items:
- key: cluster-config.yaml
path: cluster-config.yaml
secretName: example-zone1-vtadmin-clusterconfig-a6b6280c
- name: config-js-secret
secret:
defaultMode: 292
items:
- key: config.js
path: config.js
secretName: example-zone1-vtadmin-webconfig-1c814ad7