diff --git a/wordpress/.values.yaml.swo b/wordpress/.values.yaml.swo new file mode 100644 index 0000000..6a0ec81 Binary files /dev/null and b/wordpress/.values.yaml.swo differ diff --git a/wordpress/.values.yaml.swp b/wordpress/.values.yaml.swp new file mode 100644 index 0000000..9c4f765 Binary files /dev/null and b/wordpress/.values.yaml.swp differ diff --git a/wordpress/Chart.yaml b/wordpress/Chart.yaml index c835978..04917fd 100644 --- a/wordpress/Chart.yaml +++ b/wordpress/Chart.yaml @@ -18,4 +18,6 @@ version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 1.16.0 +appVersion: v7.4 + +icon: diff --git a/wordpress/templates/.statefulset.yaml.swp b/wordpress/templates/.statefulset.yaml.swp new file mode 100644 index 0000000..873921b Binary files /dev/null and b/wordpress/templates/.statefulset.yaml.swp differ diff --git a/wordpress/templates/deployment.yaml b/wordpress/templates/deployment.yaml deleted file mode 100644 index e406f98..0000000 --- a/wordpress/templates/deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "wordpress.fullname" . }} - labels: - {{- include "wordpress.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "wordpress.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "wordpress.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "wordpress.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/wordpress/templates/statefulset.yaml b/wordpress/templates/statefulset.yaml new file mode 100644 index 0000000..fc432a8 --- /dev/null +++ b/wordpress/templates/statefulset.yaml @@ -0,0 +1,118 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "wordpress.fullname" . }} + labels: + {{- include "wordpress.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + serviceName: {{ .Chart.name }} + selector: + matchLabels: + {{- include "wordpress.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "wordpress.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "wordpress.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Values.nginx.name }} + securityContext: + {{- toYaml .Values.nginx.securityContext | nindent 12 }} + image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" + imagePullPolicy: {{ .Values.nginx.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + readinessProbe: + tcpSocket: + port: http + resources: + {{- toYaml .Values.nginx.resources | nindent 12 }} + volumeMounts: + - mountPath: /var/www/html + name: wordpress-pv + - mountPath: /etc/nginx/nginx.conf + name: nginx-conf + subPath: nginx.conf + - mountPath: /etc/nginx/conf.d/default.conf + name: nginx-conf + subPath: default.conf + - name: {{ .Values.wordpress.name }} + securityContext: + {{- toYaml .Values.wordpress.securityContext | nindent 12 }} + image: "{{ .Values.wordpress.image.repository }}:{{ .Values.wordpress.image.tag }}" + imagePullPolicy: {{ .Values.wordpress.image.pullPolicy }} + env: + - name: WORDPRESS_DB_HOST + valueFrom: + secretKeyRef: + name: wp-db + key: db-host + - name: WORDPRESS_DB_PASSWORD + valueFrom: + secretKeyRef: + name: wp-db + key: wp-db-pass + - name: WORDPRESS_DB_NAME + valueFrom: + secretKeyRef: + name: wp-db + key: wp-db + - name: WORDPRESS_DB_USER + valueFrom: + secretKeyRef: + name: wp-db + key: wp-db-user + ports: + - name: php + containerPort: 9000 + protocol: TCP + livenessProbe: + tcpSocket: + port: 9000 + readinessProbe: + tcpSocket: + port: 9000 + resources: + {{- toYaml .Values.wordpress.resources | nindent 12 }} + volumeMounts: + - mountPath: /var/www/html + name: wordpress-pv + volumes: + - name: nginx-conf + secret: + defaultMode: 420 + secretName: nginx.conf + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumeClaimTemplates: + - metadata: + name: wordpress-pv + spec: + accessModes: [ "ReadWriteOnce" ] + storageClassName: {{ .Values.config.storageClassName | quote }} + resources: + requests: + storage: {{ .Values.config.storageSize }} diff --git a/wordpress/values.yaml b/wordpress/values.yaml index 0cf6612..d3ee4a7 100644 --- a/wordpress/values.yaml +++ b/wordpress/values.yaml @@ -3,14 +3,36 @@ # Declare variables to be passed into your templates. replicaCount: 1 +nginx: + name: NGINX + image: + repository: harbor.ervine.dev/library/x86_64/alpine/nginx + tag: alpine + pullPolicy: Always -image: - repository: nginx - pullPolicy: IfNotPresent + imagePullSecrets: [] + nameOverride: "" + fullnameOverride: "" -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi serviceAccount: # Specifies whether a service account should be created