diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml index 2660313c..359d487b 100644 --- a/.github/workflows/helm-tests.yml +++ b/.github/workflows/helm-tests.yml @@ -51,7 +51,7 @@ jobs: echo -n "verifying images:" docker images - - name: render raster templates + - name: helm render/install eoapi templates run: | export PGUSER=username export POSTGRES_USER=username @@ -59,42 +59,32 @@ jobs: export POSTGRES_PASSWORD=password export GITSHA='A12345' - cd helm-chart/eoapi - - MANIFEST=eoapi-manfests.yaml - echo "" > $MANIFEST - MANIFESTS=$(find ./templates/* -name "*.yaml" -not -name "ingress*.yaml") - while read MFILE; do - path_without_dot_prefix=$(echo "$MFILE" | sed 's/^\.\///g') - printf "[ RENDERING ]: %s\n" "$path_without_dot_prefix" - helm template . \ - -s $path_without_dot_prefix \ - --set gitSha=$GITSHA \ - --set db.settings.secrets.PGUSER=$PGUSER \ - --set db.settings.secrets.POSTGRES_USER=$POSTGRES_USER \ - --set db.settings.secrets.PGPASSWORD=$PGPASSWORD \ - --set db.settings.secrets.POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ - -f values.yaml \ - -f test-unittest-values.yaml >> $MANIFEST - done < <(echo "$MANIFESTS") - - - name: deploy to minikube - run: | - cd helm-chart/eoapi - kubectl apply -f eoapi-manfests.yaml + cd helm-chart - - name: sleep for 20s seconds while services boot + helm install \ + --namespace default \ + --create-namespace \ + --set gitSha=$GITSHA \ + --set db.settings.secrets.PGUSER=$PGUSER \ + --set db.settings.secrets.POSTGRES_USER=$POSTGRES_USER \ + --set db.settings.secrets.PGPASSWORD=$PGPASSWORD \ + --set db.settings.secrets.POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ + -f ./eoapi/values.yaml \ + -f ./eoapi/test-unittest-values.yaml \ + eoapi \ + ./eoapi + + - name: sleep for 10s seconds while services boot shell: bash - run: sleep 20s + run: sleep 10s - name: restart the services run: | - # usually if a pod fails b/c the DB isn't up yet it will go into CrashLoopBackOff state, so bounce them - #kubectl get pod | grep '^vector-.*$' | cut -d' ' -f1 | xargs -I{} kubectl delete pod/{} + # usually if a pod fails b/c the DB isn't up yet it will go into CrashLoopBackOff state and then restart + # and then the service is fine but minikube doesn't seem to restart things for some reason, could be + # that the underlying CMD(s) don't fully exit so we need to restart the services here kubectl rollout restart deploy/vector - #kubectl get pod | grep '^stac-.*$' | cut -d' ' -f1 | xargs -I{} kubectl delete pod/{} kubectl rollout restart deploy/stac - #kubectl get pod | grep '^raster-.*$' | cut -d' ' -f1 | xargs -I{} kubectl delete pod/{} kubectl rollout restart deploy/raster sleep 10s diff --git a/README.md b/README.md index 0c429709..59311fad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # k8s-eoapi +--- +

Test @@ -9,7 +11,6 @@

---- ## Getting Started diff --git a/docs/aws-eks.md b/docs/aws-eks.md index b548abd0..304e33af 100644 --- a/docs/aws-eks.md +++ b/docs/aws-eks.md @@ -222,6 +222,14 @@ helm upgrade \ --namespace ``` +Depending on what NGINX functionality you need you might also want to configure `kind: ConfigMap` as [talked about on their docs](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/). +Below we enable gzip by patching `use-gzip` into the `ConfigMap`: + +```python +$ kubectl get cm | grep ingress-nginx | cut -d' ' -f1 | xargs -I{} kubectl patch cm/{} --type merge -p '{"data":{"use-gzip":"true"}}' +$ kubectl get deploy | grep ingress-nginx | cut -d' ' -f1 | xargs -I{} kubectl rollout restart deploy/{} +``` + Assert that things are set up correctly: ```python