ui-deployment.yaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. apiVersion: apps/v1
  16. kind: Deployment
  17. metadata:
  18. name: {{ template "skywalking.ui.fullname" . }}
  19. labels:
  20. app: {{ template "skywalking.name" . }}
  21. chart: {{ .Chart.Name }}-{{ .Chart.Version }}
  22. component: "{{ .Values.ui.name }}"
  23. heritage: {{ .Release.Service }}
  24. release: {{ .Release.Name }}
  25. spec:
  26. replicas: {{ .Values.ui.replicas }}
  27. selector:
  28. matchLabels:
  29. app: {{ template "skywalking.name" . }}
  30. component: "{{ .Values.ui.name }}"
  31. release: {{ .Release.Name }}
  32. template:
  33. metadata:
  34. labels:
  35. app: {{ template "skywalking.name" . }}
  36. component: "{{ .Values.ui.name }}"
  37. release: {{ .Release.Name }}
  38. {{- if .Values.ui.podAnnotations }}
  39. annotations:
  40. {{ toYaml .Values.ui.podAnnotations | indent 8 }}
  41. {{- end }}
  42. spec:
  43. affinity:
  44. {{- with .Values.ui.nodeAffinity }}
  45. nodeAffinity:
  46. {{ toYaml . | indent 10 }}
  47. {{- end }}
  48. {{- if .Values.ui.nodeSelector }}
  49. nodeSelector:
  50. {{ toYaml .Values.ui.nodeSelector | indent 8 }}
  51. {{- end }}
  52. {{- if .Values.ui.tolerations }}
  53. tolerations:
  54. {{ toYaml .Values.ui.tolerations | indent 8 }}
  55. {{- end }}
  56. {{- if .Values.imagePullSecrets }}
  57. imagePullSecrets:
  58. {{ toYaml .Values.imagePullSecrets | indent 8 }}
  59. {{- end }}
  60. containers:
  61. - name: {{ .Values.ui.name }}
  62. image: {{ .Values.ui.image.repository }}:{{ required "ui.image.tag is required" .Values.ui.image.tag }}
  63. imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
  64. ports:
  65. - containerPort: {{ .Values.ui.service.internalPort }}
  66. name: page
  67. {{- if .Values.ui.resources }}
  68. resources:
  69. {{ toYaml .Values.ui.resources | indent 10 }}
  70. {{- end }}
  71. env:
  72. - name: SW_OAP_ADDRESS
  73. value: http://{{ template "skywalking.oap.fullname" . }}:{{ .Values.oap.ports.rest }}