diff --git a/choose-native-plants/Deployment/choose-native-plants.yaml b/choose-native-plants/Deployment/choose-native-plants.yaml index ada48b9..ab0ea5c 100644 --- a/choose-native-plants/Deployment/choose-native-plants.yaml +++ b/choose-native-plants/Deployment/choose-native-plants.yaml @@ -37,6 +37,9 @@ spec: key: password name: mongo optional: false + envFrom: + - secretRef: + name: pac-api image: 'mongo:5.0.6' imagePullPolicy: IfNotPresent name: choose-native-plants-db @@ -87,6 +90,18 @@ spec: key: IMAGE_URLS_SHEET_ID name: app optional: false + - name: PAC_API_BASE_URL + valueFrom: + secretKeyRef: + key: PAC_API_BASE_URL + name: pac-api + optional: false + - name: PAC_API_KEY + valueFrom: + secretKeyRef: + key: PAC_API_KEY + name: pac-api + optional: false - name: SUPERPLANTS_CSV_URL valueFrom: secretKeyRef: @@ -123,6 +138,80 @@ spec: key: SERVICE_ACCOUNT name: app optional: false + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + key: AWS_ACCESS_KEY_ID + name: linode-storage + optional: false + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + key: AWS_SECRET_ACCESS_KEY + name: linode-storage + optional: false + - name: AWS_DEFAULT_REGION + valueFrom: + secretKeyRef: + key: AWS_DEFAULT_REGION + name: linode-storage + optional: false + - name: LINODE_BUCKET_NAME + valueFrom: + secretKeyRef: + key: LINODE_BUCKET_NAME + name: linode-storage + optional: false + - name: LINODE_ENDPOINT_URL + valueFrom: + secretKeyRef: + key: LINODE_ENDPOINT_URL + name: linode-storage + optional: false + - name: PAC_API_BASE_URL + valueFrom: + secretKeyRef: + key: PAC_API_BASE_URL + name: pac-api + optional: false + - name: PAC_API_KEY + valueFrom: + secretKeyRef: + key: PAC_API_KEY + name: pac-api + optional: false + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + key: AWS_ACCESS_KEY_ID + name: linode-storage + optional: false + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + key: AWS_SECRET_ACCESS_KEY + name: linode-storage + optional: false + - name: AWS_DEFAULT_REGION + valueFrom: + secretKeyRef: + key: AWS_DEFAULT_REGION + name: linode-storage + optional: false + - name: LINODE_BUCKET_NAME + valueFrom: + secretKeyRef: + key: LINODE_BUCKET_NAME + name: linode-storage + optional: false + - name: LINODE_ENDPOINT_URL + valueFrom: + secretKeyRef: + key: LINODE_ENDPOINT_URL + name: linode-storage + optional: false + - name: NODE_OPTIONS + value: '--openssl-legacy-provider --max-old-space-size=768' envFrom: - configMapRef: name: app-config @@ -139,6 +228,11 @@ spec: - containerPort: 3000 name: http protocol: TCP + resources: + limits: + memory: 1Gi + requests: + memory: 512Mi volumeMounts: - mountPath: /app/images name: choose-native-plants-app-images @@ -147,7 +241,7 @@ spec: volumes: - name: choose-native-plants-app-images persistentVolumeClaim: - claimName: choose-native-plants-app-images + claimName: choose-native-plants-app-images-v2 - name: choose-native-plants-mongo-data persistentVolumeClaim: claimName: choose-native-plants-mongo-data diff --git a/choose-native-plants/PersistentVolumeClaim/choose-native-plants-app-images.yaml b/choose-native-plants/PersistentVolumeClaim/choose-native-plants-app-images.yaml deleted file mode 100644 index 17ec00c..0000000 --- a/choose-native-plants/PersistentVolumeClaim/choose-native-plants-app-images.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - labels: - app.kubernetes.io/instance: choose-native-plants - app.kubernetes.io/name: choose-native-plants - name: choose-native-plants-app-images - namespace: choose-native-plants -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi diff --git a/choose-native-plants/PersistentVolumeClaim/choose-native-plants-mongo-data.yaml b/choose-native-plants/PersistentVolumeClaim/choose-native-plants-mongo-data.yaml deleted file mode 100644 index 6f75dac..0000000 --- a/choose-native-plants/PersistentVolumeClaim/choose-native-plants-mongo-data.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - labels: - app.kubernetes.io/instance: choose-native-plants - app.kubernetes.io/name: choose-native-plants - name: choose-native-plants-mongo-data - namespace: choose-native-plants -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi