From 57f7d301b79918faba5ff93378044394d507c5d0 Mon Sep 17 00:00:00 2001 From: ZacharyLeahan Date: Sun, 25 May 2025 08:51:24 -0400 Subject: [PATCH 1/3] Remove existingPVCs configuration to allow automatic PVC creation --- choose-native-plants/release-values.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/choose-native-plants/release-values.yaml b/choose-native-plants/release-values.yaml index 5d939c3..20b0933 100644 --- a/choose-native-plants/release-values.yaml +++ b/choose-native-plants/release-values.yaml @@ -54,10 +54,8 @@ resources: requests: memory: 512Mi -# Use existing resources instead of creating new ones -existingPVCs: - appImages: "choose-native-plants-app-images" - mongoData: "choose-native-plants-mongo-data" +# Allow the Helm chart to create PVCs automatically +# (removed existingPVCs configuration) # Horizontal Pod Autoscaling configuration autoscaling: @@ -67,9 +65,8 @@ autoscaling: targetCPUUtilizationPercentage: 80 targetMemoryUtilizationPercentage: 80 -# Use existing service and ingress -existingService: false -existingIngress: false +# Allow the Helm chart to create Service and Ingress resources automatically +# (removed existingService and existingIngress configuration) ingress: enabled: true From b67027c619c479cd05bbc8c17bbabbdc67c67dc5 Mon Sep 17 00:00:00 2001 From: ZacharyLeahan Date: Sun, 25 May 2025 10:19:05 -0400 Subject: [PATCH 2/3] Update README.md with deployment instructions for .holo/sources and release-values.yaml --- choose-native-plants/README.md | 83 ++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 choose-native-plants/README.md diff --git a/choose-native-plants/README.md b/choose-native-plants/README.md new file mode 100644 index 0000000..d939346 --- /dev/null +++ b/choose-native-plants/README.md @@ -0,0 +1,83 @@ +# Choose Native Plants Application (Live Cluster) + +This README provides instructions for deploying and managing the Choose Native Plants application in the live Kubernetes cluster. + +## Deployment Process + +1. Update the `.holo/sources/choose-native-plants.toml` file to point to the new version tag: + +```toml +[holosource] +url = "https://github.com/CodeForPhilly/pa-wildflower-selector" +ref = "refs/tags/vX.Y.Z" # Replace with the new version tag +``` + +2. Update the `release-values.yaml` file with any necessary changes (e.g., new version number): + +```yaml +app: + image: + tag: "X.Y.Z" # Replace with the new version number (without the 'v' prefix) +``` + +Ensure that the version in both files match (with the toml file using the 'v' prefix and release-values.yaml without it). + +3. Create or update any sealed secrets as needed: + +```powershell +# Create a regular Kubernetes secret YAML file +# Example for PAC API credentials +kubectl create secret generic pac-api --from-literal=PAC_API_BASE_URL=https://app.plantagents.org --from-literal=PAC_API_KEY=your-api-key --dry-run=client -o yaml > pac-api-secret.yaml + +# Seal the secret +kubeseal --cert https://sealed-secrets.live.k8s.phl.io/v1/cert.pem --namespace choose-native-plants -f pac-api-secret.yaml -w cfp-live-cluster/choose-native-plants.secrets/pac-api.yaml +``` + +4. Commit and push the changes to the repository: + +```powershell +git add release-values.yaml choose-native-plants.secrets/ +git commit -m "Update Choose Native Plants configuration" +git push origin main +``` + +4. The GitOps process will automatically deploy the changes to the live cluster. + +## Important Notes + +- Direct Helm commands are not used in the live environment. All changes are applied through the GitOps workflow using materialized manifests. +- The deployment may take some time to complete after pushing changes. +- Monitor the pod status to verify the deployment: `kubectl get pods -n choose-native-plants` +- The application is accessible at: + - https://choose-native-plants.live.k8s.phl.io/ + - https://choosenativeplants.com/ + - https://www.choosenativeplants.com/ + +## Managing the Application + +### Syncing Images + +To sync images with the Linode Object Storage, use this command which automatically finds the current pod: + +```powershell +$POD_NAME = kubectl get pods -n choose-native-plants -l app.kubernetes.io/name=choose-native-plants -o jsonpath='{.items[0].metadata.name}' +kubectl exec -it $POD_NAME -n choose-native-plants -c choose-native-plants-app -- /bin/sh /app/scripts/sync-images +``` + +### Downloading Data (Skip Images) + +To download data without images, use this command: + +```powershell +$POD_NAME = kubectl get pods -n choose-native-plants -l app.kubernetes.io/name=choose-native-plants -o jsonpath='{.items[0].metadata.name}' +kubectl exec -it $POD_NAME -n choose-native-plants -c choose-native-plants-app -- node download --skip-images +``` + +### Massaging Data + +To process the data, use this command: + +```powershell +$POD_NAME = kubectl get pods -n choose-native-plants -l app.kubernetes.io/name=choose-native-plants -o jsonpath='{.items[0].metadata.name}' +kubectl exec -it $POD_NAME -n choose-native-plants -c choose-native-plants-app -- node massage +``` \ No newline at end of file From 10b5befe30a775411ef954ec15098f61988cb0a8 Mon Sep 17 00:00:00 2001 From: ZacharyLeahan Date: Sun, 25 May 2025 10:19:43 -0400 Subject: [PATCH 3/3] Update deployment configuration for production release 2.0.4 --- .holo/sources/choose-native-plants.toml | 2 +- choose-native-plants/release-values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.holo/sources/choose-native-plants.toml b/.holo/sources/choose-native-plants.toml index 5990fd4..9bdd494 100644 --- a/.holo/sources/choose-native-plants.toml +++ b/.holo/sources/choose-native-plants.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/CodeForPhilly/pa-wildflower-selector" -ref = "refs/tags/v2.0.3" +ref = "refs/tags/v2.0.4" diff --git a/choose-native-plants/release-values.yaml b/choose-native-plants/release-values.yaml index 20b0933..53c2a28 100644 --- a/choose-native-plants/release-values.yaml +++ b/choose-native-plants/release-values.yaml @@ -1,6 +1,6 @@ app: image: - tag: "2.0.3" + tag: "2.0.4" env: - name: PAC_API_BASE_URL valueFrom: