Sin descripción

iris_app.yaml 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. apiVersion: v1
  2. kind: Secret
  3. metadata:
  4. name: iris-root-ca-cert-secret-app
  5. labels:
  6. app: {{ .Values.irisworker.app }}
  7. type: Opaque
  8. data:
  9. {{ (.Files.Glob "certificates/rootCA/irisRootCACert.pem").AsSecrets | indent 2 }}
  10. ---
  11. apiVersion: v1
  12. kind: Secret
  13. metadata:
  14. name: iris-ldap-certs-secret-app
  15. labels:
  16. app: {{ .Values.irisworker.app }}
  17. type: Opaque
  18. data:
  19. {{ (.Files.Glob "certificates/ldap/*").AsSecrets | indent 2 }}
  20. ---
  21. apiVersion: v1
  22. kind: Secret
  23. metadata:
  24. name: iris-certs-dir-rootca-secrets-app
  25. labels:
  26. app: {{ .Values.irisworker.app }}
  27. type: Opaque
  28. data:
  29. {{ (.Files.Glob "certificates/rootCA/*").AsSecrets | indent 2 }}
  30. ---
  31. apiVersion: v1
  32. kind: Secret
  33. metadata:
  34. name: iris-certs-dir-webcerts-secrets-app
  35. labels:
  36. app: {{ .Values.irisworker.app }}
  37. type: Opaque
  38. data:
  39. {{ (.Files.Glob "certificates/web_certificates/*").AsSecrets | indent 2 }}
  40. ---
  41. apiVersion: apps/v1
  42. kind: Deployment
  43. metadata:
  44. name: {{ .Values.irisapp.name }}
  45. spec:
  46. replicas: {{ .Values.irisapp.replicaCount }}
  47. selector:
  48. matchLabels:
  49. app: {{ .Values.irisapp.app }}
  50. template:
  51. metadata:
  52. labels:
  53. app: {{ .Values.irisapp.app }}
  54. spec:
  55. securityContext:
  56. {{- toYaml .Values.irisapp.podSecurityContext | nindent 8 }}
  57. containers:
  58. - name: {{ .Values.irisapp.name }}
  59. securityContext:
  60. {{- toYaml .Values.irisapp.securityContext | nindent 12 }}
  61. resources:
  62. {{- toYaml .Values.irisapp.resources | nindent 12 }}
  63. image: "{{ .Values.irisapp.image}}:{{ .Values.irisapp.tag }}"
  64. imagePullPolicy: "{{ .Values.irisapp.imagePullPolicy }}"
  65. command: ['nohup', './iris-entrypoint.sh', 'iriswebapp']
  66. env:
  67. - name: POSTGRES_USER # Setting Database username
  68. value: {{ .Values.irisapp.POSTGRES_USER| quote }}
  69. - name: POSTGRES_PASSWORDD # Setting Database password
  70. value: {{ .Values.irisapp.POSTGRES_PASSWORD | quote }}
  71. - name: POSTGRES_ADMIN_USER # Setting Database admin user
  72. value: {{ .Values.irisapp.POSTGRES_ADMIN_USER | quote }}
  73. - name: POSTGRES_ADMIN_PASSWORD # Setting Database admin password
  74. value: {{ .Values.irisapp.POSTGRES_ADMIN_PASSWORD | quote }}
  75. - name: POSTGRES_PORT # Setting Database port
  76. value: {{ .Values.irisapp.POSTGRES_PORT | quote }}
  77. - name: POSTGRES_SERVER # Setting Database server
  78. value: {{ .Values.irisapp.POSTGRES_SERVER | quote }}
  79. - name: IRIS_SECRET_KEY
  80. value: {{ .Values.irisapp.IRIS_SECRET_KEY | quote }}
  81. - name: IRIS_SECURITY_PASSWORD_SALT
  82. value: {{ .Values.irisapp.IRIS_SECURITY_PASSWORD_SALT | quote }}
  83. - name: DB_RETRY_COUNT
  84. value: {{ .Values.irisapp.DB_RETRY_COUNT | quote }}
  85. - name: DB_RETRY_DELAY
  86. value: {{ .Values.irisapp.DB_RETRY_DELAY | quote }}
  87. - name: INTERFACE_HTTPS_PORT
  88. value: {{ .Values.irisapp.INTERFACE_HTTPS_PORT | quote }}
  89. - name: IRIS_ADM_USERNAME
  90. value: {{ .Values.irisapp.IRIS_ADM_USERNAME | quote }}
  91. - name: IRIS_ADM_PASSWORD
  92. value: {{ .Values.irisapp.IRIS_ADM_PASSWORD | quote }}
  93. ports:
  94. - containerPort: 8000
  95. volumeMounts:
  96. - mountPath: /home/iris/downloads
  97. name: iris-downloads
  98. - mountPath: /home/iris/user_templates
  99. name: user-templates
  100. - mountPath: /home/iris/server_data
  101. name: server-data
  102. - mountPath: /etc/irisRootCACert.pem
  103. name: iris-root-ca-cert
  104. subPath: irisRootCACert.pem
  105. readOnly: true
  106. - mountPath: /home/iris/certificates/rootCA
  107. name: iris-certs-dir-rootca
  108. readOnly: true
  109. - mountPath: /home/iris/certificates/web_certificates
  110. name: iris-certs-dir-webcerts
  111. readOnly: true
  112. - mountPath: /iriswebapp/certificates/ldap/
  113. name: iris-ldap-certs
  114. readOnly: true
  115. volumes:
  116. - name: iris-downloads
  117. emptyDir: {}
  118. - name: user-templates
  119. emptyDir: {}
  120. - name: server-data
  121. emptyDir: {}
  122. - name: iris-root-ca-cert
  123. secret:
  124. secretName: iris-root-ca-cert-secret-app
  125. - name: iris-ldap-certs
  126. secret:
  127. secretName: iris-ldap-certs-secret-app
  128. - name: iris-certs-dir-rootca
  129. secret:
  130. secretName: iris-certs-dir-rootca-secrets-app
  131. - name: iris-certs-dir-webcerts
  132. secret:
  133. secretName: iris-certs-dir-webcerts-secrets-app
  134. ---
  135. apiVersion: v1
  136. kind: Service
  137. metadata:
  138. name: {{ .Values.irisapp.name }}
  139. labels:
  140. app: {{ .Values.irisapp.app }}
  141. spec:
  142. type: {{ .Values.irisapp.type }}
  143. ports:
  144. - port: {{ .Values.irisapp.service.port }}
  145. targetPort: {{ .Values.irisapp.service.targetPort }}
  146. selector:
  147. app: {{ .Values.irisapp.app }}
  148. ---