diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 72e25147..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us improve -labels: bug ---- - - - - -#### Problem description - -[this should explain **why** the current behavior is a problem and why the expected output is a better solution.] - -#### Expected Output - - -#### Environment Information - -Os, Python version, ... diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 48d85ed3..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Discussions and Q/A - url: https://github.com/developmentseed/eoapi-k8s/discussions/categories/q-a - about: Please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 516403f3..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ -## Feature Request: [Title of the Feature] - - - -### Summary -A brief summary of the feature request and what it aims to accomplish. - -### Problem Statement -Describe the problem or pain point that this feature would address. Why is this feature important? What issues are users currently facing that this feature would solve? - -### Proposed Solution -Outline the proposed solution for the feature. Include any relevant details, such as how the feature would work, what changes it would involve, and any specific requirements or considerations. - -### Additional Details -Provide any additional information that might be helpful for understanding the feature request. This could include: - -- Examples of how the feature could be used -- Screenshots or diagrams illustrating the feature -- Potential limitations or edge cases -- Links to related discussions or prior issues \ No newline at end of file diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml index 802000f9..bd9c11b5 100644 --- a/.github/workflows/helm-tests.yml +++ b/.github/workflows/helm-tests.yml @@ -23,7 +23,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - run: | - cd helm-chart + cd charts helm unittest eoapi -f 'tests/*.yaml' -v eoapi/test-helm-values.yaml k3s-integration-tests: if: github.event.pull_request.head.repo.full_name == github.repository @@ -80,7 +80,7 @@ jobs: run: | export GITSHA='${{github.sha}}' - cd helm-chart + cd charts helm dependency build eoapi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca8c11c8..3189d19a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,9 +37,8 @@ jobs: - name: run chart-releaser uses: helm/chart-releaser-action@v1.6.0 with: - charts_dir: helm-chart + charts_dir: charts env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_SKIP_EXISTING: true CR_INDEX_PATH: "." - diff --git a/.gitignore b/.gitignore index 335b2c80..22414605 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .idea/ -helm-chart/config.yaml +.vscode/ +.pytest_cache +charts/config.yaml +charts/eoapi/charts/*.tgz config_ingress.yaml -helm-chart/eoapi/charts/*.tgz diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 082b1943..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "makefile.configureOnOpen": false -} \ No newline at end of file diff --git a/Makefile b/Makefile index 1d3dbe08..c069f115 100755 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ deploy: @echo "Adding eoAPI helm repository." @helm repo add eoapi $(HELM_REPO_URL) @echo "Installing eoAPI helm chart." - @cd ./helm-chart && \ + @cd ./charts && \ helm dependency build ./eoapi && \ helm upgrade --install --namespace eoapi --create-namespace --set gitSha=$$(git rev-parse HEAD | cut -c1-10) eoapi ./eoapi @@ -34,12 +34,12 @@ minikube: ingest: @echo "Ingesting STAC collections and items into the database." @command -v bash >/dev/null 2>&1 || { echo "bash is required but not installed"; exit 1; } - @./ingest.sh || { echo "Ingestion failed."; exit 1; } + @./scripts/ingest.sh || { echo "Ingestion failed."; exit 1; } tests: @echo "Running tests." @command -v helm >/dev/null 2>&1 || { echo "helm is required but not installed"; exit 1; } - @helm unittest helm-chart/eoapi -f 'tests/*.yaml' -v helm-chart/eoapi/test-helm-values.yaml + @helm unittest charts/eoapi -f 'tests/*.yaml' -v charts/eoapi/test-helm-values.yaml help: @echo "Makefile commands:" diff --git a/README.md b/README.md index 8b343c1b..766d3828 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,6 @@ For cloud-based deployments, refer to our detailed setup guides: * [Unified Ingress Configuration](./docs/unified-ingress.md) * [Upgrade Guide](./docs/upgrade.md) -> **Important Notice**: If you're upgrading from a version prior to 0.7.0, please read the [upgrade guide](./docs/upgrade.md) for important database permission changes. - ## Contributing We welcome contributions! See our [contributing guide](./CONTRIBUTING.md) for details. diff --git a/helm-chart/.gitignore b/charts/.gitignore similarity index 100% rename from helm-chart/.gitignore rename to charts/.gitignore diff --git a/helm-chart/eoapi-support/.gitignore b/charts/eoapi-support/.gitignore similarity index 100% rename from helm-chart/eoapi-support/.gitignore rename to charts/eoapi-support/.gitignore diff --git a/helm-chart/eoapi-support/.helmignore b/charts/eoapi-support/.helmignore similarity index 100% rename from helm-chart/eoapi-support/.helmignore rename to charts/eoapi-support/.helmignore diff --git a/helm-chart/eoapi-support/Chart.yaml b/charts/eoapi-support/Chart.yaml similarity index 100% rename from helm-chart/eoapi-support/Chart.yaml rename to charts/eoapi-support/Chart.yaml diff --git a/helm-chart/eoapi-support/README.md b/charts/eoapi-support/README.md similarity index 100% rename from helm-chart/eoapi-support/README.md rename to charts/eoapi-support/README.md diff --git a/helm-chart/eoapi-support/dashboards/eoAPI-Dashboard.json b/charts/eoapi-support/dashboards/eoAPI-Dashboard.json similarity index 100% rename from helm-chart/eoapi-support/dashboards/eoAPI-Dashboard.json rename to charts/eoapi-support/dashboards/eoAPI-Dashboard.json diff --git a/helm-chart/eoapi-support/templates/dashboard.config.yaml b/charts/eoapi-support/templates/dashboard.config.yaml similarity index 100% rename from helm-chart/eoapi-support/templates/dashboard.config.yaml rename to charts/eoapi-support/templates/dashboard.config.yaml diff --git a/helm-chart/eoapi-support/values.yaml b/charts/eoapi-support/values.yaml similarity index 100% rename from helm-chart/eoapi-support/values.yaml rename to charts/eoapi-support/values.yaml diff --git a/helm-chart/eoapi/.gitignore b/charts/eoapi/.gitignore similarity index 100% rename from helm-chart/eoapi/.gitignore rename to charts/eoapi/.gitignore diff --git a/helm-chart/eoapi/.helmignore b/charts/eoapi/.helmignore similarity index 100% rename from helm-chart/eoapi/.helmignore rename to charts/eoapi/.helmignore diff --git a/helm-chart/eoapi/Chart.yaml b/charts/eoapi/Chart.yaml similarity index 100% rename from helm-chart/eoapi/Chart.yaml rename to charts/eoapi/Chart.yaml diff --git a/helm-chart/eoapi/README.md b/charts/eoapi/README.md similarity index 97% rename from helm-chart/eoapi/README.md rename to charts/eoapi/README.md index 8fb8a92c..7d05c59b 100644 --- a/helm-chart/eoapi/README.md +++ b/charts/eoapi/README.md @@ -1,6 +1,6 @@ # eoAPI Helm Chart -![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.2](https://img.shields.io/badge/AppVersion-5.0.2-informational?style=flat-square) +![Version: 0.7.5](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.2](https://img.shields.io/badge/AppVersion-5.0.2-informational?style=flat-square) A Helm chart for deploying Earth Observation APIs with integrated STAC, raster, vector, and multidimensional services. diff --git a/helm-chart/eoapi/initdb-data/samples/my_data.sql b/charts/eoapi/initdb-data/samples/my_data.sql similarity index 100% rename from helm-chart/eoapi/initdb-data/samples/my_data.sql rename to charts/eoapi/initdb-data/samples/my_data.sql diff --git a/helm-chart/eoapi/initdb-data/samples/noaa-emergency-response.json b/charts/eoapi/initdb-data/samples/noaa-emergency-response.json similarity index 100% rename from helm-chart/eoapi/initdb-data/samples/noaa-emergency-response.json rename to charts/eoapi/initdb-data/samples/noaa-emergency-response.json diff --git a/helm-chart/eoapi/initdb-data/samples/noaa-eri-nashville2020.json b/charts/eoapi/initdb-data/samples/noaa-eri-nashville2020.json similarity index 100% rename from helm-chart/eoapi/initdb-data/samples/noaa-eri-nashville2020.json rename to charts/eoapi/initdb-data/samples/noaa-eri-nashville2020.json diff --git a/helm-chart/eoapi/initdb-data/settings/pgstac-settings.sql b/charts/eoapi/initdb-data/settings/pgstac-settings.sql similarity index 100% rename from helm-chart/eoapi/initdb-data/settings/pgstac-settings.sql rename to charts/eoapi/initdb-data/settings/pgstac-settings.sql diff --git a/helm-chart/eoapi/samples/values-with-nginx.yaml b/charts/eoapi/samples/values-with-nginx.yaml similarity index 100% rename from helm-chart/eoapi/samples/values-with-nginx.yaml rename to charts/eoapi/samples/values-with-nginx.yaml diff --git a/helm-chart/eoapi/templates/NOTES.txt b/charts/eoapi/templates/NOTES.txt similarity index 100% rename from helm-chart/eoapi/templates/NOTES.txt rename to charts/eoapi/templates/NOTES.txt diff --git a/helm-chart/eoapi/templates/_helpers.tpl b/charts/eoapi/templates/_helpers.tpl similarity index 100% rename from helm-chart/eoapi/templates/_helpers.tpl rename to charts/eoapi/templates/_helpers.tpl diff --git a/helm-chart/eoapi/templates/_pgstac_init.tpl b/charts/eoapi/templates/_pgstac_init.tpl similarity index 100% rename from helm-chart/eoapi/templates/_pgstac_init.tpl rename to charts/eoapi/templates/_pgstac_init.tpl diff --git a/helm-chart/eoapi/templates/pgstacbootstrap/configmap.yaml b/charts/eoapi/templates/pgstacbootstrap/configmap.yaml similarity index 100% rename from helm-chart/eoapi/templates/pgstacbootstrap/configmap.yaml rename to charts/eoapi/templates/pgstacbootstrap/configmap.yaml diff --git a/helm-chart/eoapi/templates/pgstacbootstrap/eoap-superuser-initdb.yaml b/charts/eoapi/templates/pgstacbootstrap/eoap-superuser-initdb.yaml similarity index 100% rename from helm-chart/eoapi/templates/pgstacbootstrap/eoap-superuser-initdb.yaml rename to charts/eoapi/templates/pgstacbootstrap/eoap-superuser-initdb.yaml diff --git a/helm-chart/eoapi/templates/pgstacbootstrap/job.yaml b/charts/eoapi/templates/pgstacbootstrap/job.yaml similarity index 100% rename from helm-chart/eoapi/templates/pgstacbootstrap/job.yaml rename to charts/eoapi/templates/pgstacbootstrap/job.yaml diff --git a/helm-chart/eoapi/templates/service-account.yaml b/charts/eoapi/templates/service-account.yaml similarity index 100% rename from helm-chart/eoapi/templates/service-account.yaml rename to charts/eoapi/templates/service-account.yaml diff --git a/helm-chart/eoapi/templates/services/README.md b/charts/eoapi/templates/services/README.md similarity index 100% rename from helm-chart/eoapi/templates/services/README.md rename to charts/eoapi/templates/services/README.md diff --git a/helm-chart/eoapi/templates/services/_common.tpl b/charts/eoapi/templates/services/_common.tpl similarity index 100% rename from helm-chart/eoapi/templates/services/_common.tpl rename to charts/eoapi/templates/services/_common.tpl diff --git a/helm-chart/eoapi/templates/services/browser/deployment.yaml b/charts/eoapi/templates/services/browser/deployment.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/browser/deployment.yaml rename to charts/eoapi/templates/services/browser/deployment.yaml diff --git a/helm-chart/eoapi/templates/services/browser/service.yaml b/charts/eoapi/templates/services/browser/service.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/browser/service.yaml rename to charts/eoapi/templates/services/browser/service.yaml diff --git a/helm-chart/eoapi/templates/services/doc-server.yaml b/charts/eoapi/templates/services/doc-server.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/doc-server.yaml rename to charts/eoapi/templates/services/doc-server.yaml diff --git a/helm-chart/eoapi/templates/services/ingress-browser.yaml b/charts/eoapi/templates/services/ingress-browser.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/ingress-browser.yaml rename to charts/eoapi/templates/services/ingress-browser.yaml diff --git a/helm-chart/eoapi/templates/services/ingress.yaml b/charts/eoapi/templates/services/ingress.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/ingress.yaml rename to charts/eoapi/templates/services/ingress.yaml diff --git a/helm-chart/eoapi/templates/services/multidim/configmap.yaml b/charts/eoapi/templates/services/multidim/configmap.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/multidim/configmap.yaml rename to charts/eoapi/templates/services/multidim/configmap.yaml diff --git a/helm-chart/eoapi/templates/services/multidim/deployment.yaml b/charts/eoapi/templates/services/multidim/deployment.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/multidim/deployment.yaml rename to charts/eoapi/templates/services/multidim/deployment.yaml diff --git a/helm-chart/eoapi/templates/services/multidim/hpa.yaml b/charts/eoapi/templates/services/multidim/hpa.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/multidim/hpa.yaml rename to charts/eoapi/templates/services/multidim/hpa.yaml diff --git a/helm-chart/eoapi/templates/services/multidim/service.yaml b/charts/eoapi/templates/services/multidim/service.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/multidim/service.yaml rename to charts/eoapi/templates/services/multidim/service.yaml diff --git a/helm-chart/eoapi/templates/services/raster/configmap.yaml b/charts/eoapi/templates/services/raster/configmap.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/raster/configmap.yaml rename to charts/eoapi/templates/services/raster/configmap.yaml diff --git a/helm-chart/eoapi/templates/services/raster/deployment.yaml b/charts/eoapi/templates/services/raster/deployment.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/raster/deployment.yaml rename to charts/eoapi/templates/services/raster/deployment.yaml diff --git a/helm-chart/eoapi/templates/services/raster/hpa.yaml b/charts/eoapi/templates/services/raster/hpa.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/raster/hpa.yaml rename to charts/eoapi/templates/services/raster/hpa.yaml diff --git a/helm-chart/eoapi/templates/services/raster/service.yaml b/charts/eoapi/templates/services/raster/service.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/raster/service.yaml rename to charts/eoapi/templates/services/raster/service.yaml diff --git a/helm-chart/eoapi/templates/services/rbac.yaml b/charts/eoapi/templates/services/rbac.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/rbac.yaml rename to charts/eoapi/templates/services/rbac.yaml diff --git a/helm-chart/eoapi/templates/services/stac/configmap.yaml b/charts/eoapi/templates/services/stac/configmap.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/stac/configmap.yaml rename to charts/eoapi/templates/services/stac/configmap.yaml diff --git a/helm-chart/eoapi/templates/services/stac/deployment.yaml b/charts/eoapi/templates/services/stac/deployment.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/stac/deployment.yaml rename to charts/eoapi/templates/services/stac/deployment.yaml diff --git a/helm-chart/eoapi/templates/services/stac/hpa.yaml b/charts/eoapi/templates/services/stac/hpa.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/stac/hpa.yaml rename to charts/eoapi/templates/services/stac/hpa.yaml diff --git a/helm-chart/eoapi/templates/services/stac/service.yaml b/charts/eoapi/templates/services/stac/service.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/stac/service.yaml rename to charts/eoapi/templates/services/stac/service.yaml diff --git a/helm-chart/eoapi/templates/services/traefik-middleware.yaml b/charts/eoapi/templates/services/traefik-middleware.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/traefik-middleware.yaml rename to charts/eoapi/templates/services/traefik-middleware.yaml diff --git a/helm-chart/eoapi/templates/services/vector/configmap.yaml b/charts/eoapi/templates/services/vector/configmap.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/vector/configmap.yaml rename to charts/eoapi/templates/services/vector/configmap.yaml diff --git a/helm-chart/eoapi/templates/services/vector/deployment.yaml b/charts/eoapi/templates/services/vector/deployment.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/vector/deployment.yaml rename to charts/eoapi/templates/services/vector/deployment.yaml diff --git a/helm-chart/eoapi/templates/services/vector/hpa.yaml b/charts/eoapi/templates/services/vector/hpa.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/vector/hpa.yaml rename to charts/eoapi/templates/services/vector/hpa.yaml diff --git a/helm-chart/eoapi/templates/services/vector/service.yaml b/charts/eoapi/templates/services/vector/service.yaml similarity index 100% rename from helm-chart/eoapi/templates/services/vector/service.yaml rename to charts/eoapi/templates/services/vector/service.yaml diff --git a/helm-chart/eoapi/test-helm-values.yaml b/charts/eoapi/test-helm-values.yaml similarity index 100% rename from helm-chart/eoapi/test-helm-values.yaml rename to charts/eoapi/test-helm-values.yaml diff --git a/helm-chart/eoapi/test-k3s-unittest-values.yaml b/charts/eoapi/test-k3s-unittest-values.yaml similarity index 100% rename from helm-chart/eoapi/test-k3s-unittest-values.yaml rename to charts/eoapi/test-k3s-unittest-values.yaml diff --git a/helm-chart/eoapi/tests/config_tests.yaml b/charts/eoapi/tests/config_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/config_tests.yaml rename to charts/eoapi/tests/config_tests.yaml diff --git a/helm-chart/eoapi/tests/deploy_tests.yaml b/charts/eoapi/tests/deploy_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/deploy_tests.yaml rename to charts/eoapi/tests/deploy_tests.yaml diff --git a/helm-chart/eoapi/tests/hpa_tests.yaml b/charts/eoapi/tests/hpa_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/hpa_tests.yaml rename to charts/eoapi/tests/hpa_tests.yaml diff --git a/helm-chart/eoapi/tests/ingress_tests.yaml b/charts/eoapi/tests/ingress_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/ingress_tests.yaml rename to charts/eoapi/tests/ingress_tests.yaml diff --git a/helm-chart/eoapi/tests/multidim_tests.yaml b/charts/eoapi/tests/multidim_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/multidim_tests.yaml rename to charts/eoapi/tests/multidim_tests.yaml diff --git a/helm-chart/eoapi/tests/postgres_tests.yaml b/charts/eoapi/tests/postgres_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/postgres_tests.yaml rename to charts/eoapi/tests/postgres_tests.yaml diff --git a/helm-chart/eoapi/tests/raster_tests.yaml b/charts/eoapi/tests/raster_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/raster_tests.yaml rename to charts/eoapi/tests/raster_tests.yaml diff --git a/helm-chart/eoapi/tests/stac_tests.yaml b/charts/eoapi/tests/stac_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/stac_tests.yaml rename to charts/eoapi/tests/stac_tests.yaml diff --git a/helm-chart/eoapi/tests/vector_tests.yaml b/charts/eoapi/tests/vector_tests.yaml similarity index 100% rename from helm-chart/eoapi/tests/vector_tests.yaml rename to charts/eoapi/tests/vector_tests.yaml diff --git a/helm-chart/eoapi/values.schema.json b/charts/eoapi/values.schema.json similarity index 100% rename from helm-chart/eoapi/values.schema.json rename to charts/eoapi/values.schema.json diff --git a/helm-chart/eoapi/values.yaml b/charts/eoapi/values.yaml similarity index 99% rename from helm-chart/eoapi/values.yaml rename to charts/eoapi/values.yaml index 6a7e0eeb..0c72af0f 100644 --- a/helm-chart/eoapi/values.yaml +++ b/charts/eoapi/values.yaml @@ -95,7 +95,7 @@ postgresql: port: "port" database: "database" -# this is declared as a dependency of eoapi in helm-chart/eoapi/Chart.yaml +# this is declared as a dependency of eoapi in charts/eoapi/Chart.yaml postgrescluster: enabled: true # The name of the postgres cluster diff --git a/helm-chart/postgrescluster/Chart.yaml b/charts/postgrescluster/Chart.yaml similarity index 100% rename from helm-chart/postgrescluster/Chart.yaml rename to charts/postgrescluster/Chart.yaml diff --git a/helm-chart/postgrescluster/templates/NOTES.txt b/charts/postgrescluster/templates/NOTES.txt similarity index 100% rename from helm-chart/postgrescluster/templates/NOTES.txt rename to charts/postgrescluster/templates/NOTES.txt diff --git a/helm-chart/postgrescluster/templates/_azure.tpl b/charts/postgrescluster/templates/_azure.tpl similarity index 100% rename from helm-chart/postgrescluster/templates/_azure.tpl rename to charts/postgrescluster/templates/_azure.tpl diff --git a/helm-chart/postgrescluster/templates/_gcs.tpl b/charts/postgrescluster/templates/_gcs.tpl similarity index 100% rename from helm-chart/postgrescluster/templates/_gcs.tpl rename to charts/postgrescluster/templates/_gcs.tpl diff --git a/helm-chart/postgrescluster/templates/_s3.tpl b/charts/postgrescluster/templates/_s3.tpl similarity index 100% rename from helm-chart/postgrescluster/templates/_s3.tpl rename to charts/postgrescluster/templates/_s3.tpl diff --git a/helm-chart/postgrescluster/templates/pgbackrest-secret.yaml b/charts/postgrescluster/templates/pgbackrest-secret.yaml similarity index 100% rename from helm-chart/postgrescluster/templates/pgbackrest-secret.yaml rename to charts/postgrescluster/templates/pgbackrest-secret.yaml diff --git a/helm-chart/postgrescluster/templates/postgres.yaml b/charts/postgrescluster/templates/postgres.yaml similarity index 100% rename from helm-chart/postgrescluster/templates/postgres.yaml rename to charts/postgrescluster/templates/postgres.yaml diff --git a/helm-chart/postgrescluster/values.yaml b/charts/postgrescluster/values.yaml similarity index 100% rename from helm-chart/postgrescluster/values.yaml rename to charts/postgrescluster/values.yaml diff --git a/configs/aws-asg-policy.json b/configs/aws-asg-policy.json deleted file mode 100644 index d29a27dd..00000000 --- a/configs/aws-asg-policy.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "autoscaling:DescribeAutoScalingGroups", - "autoscaling:DescribeAutoScalingInstances", - "autoscaling:DescribeLaunchConfigurations", - "autoscaling:DescribeScalingActivities", - "autoscaling:DescribeTags", - "ec2:DescribeInstanceTypes", - "ec2:DescribeLaunchTemplateVersions" - ], - "Resource": ["*"] - }, - { - "Effect": "Allow", - "Action": [ - "autoscaling:SetDesiredCapacity", - "autoscaling:TerminateInstanceInAutoScalingGroup", - "ec2:DescribeImages", - "ec2:GetInstanceTypesFromInstanceRequirements", - "eks:DescribeNodegroup" - ], - "Resource": ["*"] - } - ] - } \ No newline at end of file diff --git a/configs/cluster-autoscaler-autodiscover.yaml b/configs/cluster-autoscaler-autodiscover.yaml deleted file mode 100644 index 1e2fae82..00000000 --- a/configs/cluster-autoscaler-autodiscover.yaml +++ /dev/null @@ -1,179 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - k8s-addon: cluster-autoscaler.addons.k8s.io - k8s-app: cluster-autoscaler - name: cluster-autoscaler - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cluster-autoscaler - labels: - k8s-addon: cluster-autoscaler.addons.k8s.io - k8s-app: cluster-autoscaler -rules: -- apiGroups: [""] - resources: ["events", "endpoints"] - verbs: ["create", "patch"] -- apiGroups: [""] - resources: ["pods/eviction"] - verbs: ["create"] -- apiGroups: [""] - resources: ["pods/status"] - verbs: ["update"] -- apiGroups: [""] - resources: ["endpoints"] - resourceNames: ["cluster-autoscaler"] - verbs: ["get", "update"] -- apiGroups: [""] - resources: ["nodes"] - verbs: ["watch", "list", "get", "update"] -- apiGroups: [""] - resources: - - "namespaces" - - "pods" - - "services" - - "replicationcontrollers" - - "persistentvolumeclaims" - - "persistentvolumes" - verbs: ["watch", "list", "get"] -- apiGroups: ["extensions"] - resources: ["replicasets", "daemonsets"] - verbs: ["watch", "list", "get"] -- apiGroups: ["policy"] - resources: ["poddisruptionbudgets"] - verbs: ["watch", "list"] -- apiGroups: ["apps"] - resources: ["statefulsets", "replicasets", "daemonsets"] - verbs: ["watch", "list", "get"] -- apiGroups: ["storage.k8s.io"] - resources: ["storageclasses", "csinodes", "csidrivers", "csistoragecapacities"] - verbs: ["watch", "list", "get"] -- apiGroups: ["batch", "extensions"] - resources: ["jobs"] - verbs: ["get", "list", "watch", "patch"] -- apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["create"] -- apiGroups: ["coordination.k8s.io"] - resourceNames: ["cluster-autoscaler"] - resources: ["leases"] - verbs: ["get", "update"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: cluster-autoscaler - namespace: kube-system - labels: - k8s-addon: cluster-autoscaler.addons.k8s.io - k8s-app: cluster-autoscaler -rules: -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["create", "list", "watch"] -- apiGroups: [""] - resources: ["configmaps"] - resourceNames: ["cluster-autoscaler-status", "cluster-autoscaler-priority-expander"] - verbs: ["delete", "get", "update", "watch"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: cluster-autoscaler - labels: - k8s-addon: cluster-autoscaler.addons.k8s.io - k8s-app: cluster-autoscaler -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-autoscaler -subjects: -- kind: ServiceAccount - name: cluster-autoscaler - namespace: kube-system - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: cluster-autoscaler - namespace: kube-system - labels: - k8s-addon: cluster-autoscaler.addons.k8s.io - k8s-app: cluster-autoscaler -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: cluster-autoscaler -subjects: -- kind: ServiceAccount - name: cluster-autoscaler - namespace: kube-system - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cluster-autoscaler - namespace: kube-system - labels: - app: cluster-autoscaler -spec: - replicas: 1 - selector: - matchLabels: - app: cluster-autoscaler - template: - metadata: - labels: - app: cluster-autoscaler - annotations: - prometheus.io/scrape: 'true' - prometheus.io/port: '8085' - spec: - priorityClassName: system-cluster-critical - securityContext: - runAsNonRoot: true - runAsUser: 65534 - fsGroup: 65534 - seccompProfile: - type: RuntimeDefault - serviceAccountName: cluster-autoscaler - containers: - - image: registry.k8s.io/autoscaling/cluster-autoscaler:v1.26.2 - name: cluster-autoscaler - resources: - limits: - cpu: 100m - memory: 600Mi - requests: - cpu: 100m - memory: 600Mi - command: - - ./cluster-autoscaler - - --v=4 - - --stderrthreshold=info - - --cloud-provider=aws - - --skip-nodes-with-local-storage=false - - --expander=least-waste - - --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/sandbox - volumeMounts: - - name: ssl-certs - mountPath: /etc/ssl/certs/ca-certificates.crt # /etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes - readOnly: true - imagePullPolicy: "Always" - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - volumes: - - name: ssl-certs - hostPath: - path: "/etc/ssl/certs/ca-bundle.crt" diff --git a/docs/autoscaling.md b/docs/autoscaling.md index 3c019e5a..8702441d 100644 --- a/docs/autoscaling.md +++ b/docs/autoscaling.md @@ -1,13 +1,13 @@ # Autoscaling / Monitoring / Observability Autoscaling is both art and science. To test out your application's autoscaling requirements you often need to consider -your data volume, data usage patterns, bottlenecks (such as the database) among many, many other things. Load testing, -metrics, monitoring and observability will help you explore what those needs are. +your data volume, data usage patterns, bottlenecks (such as the database) among many, many other things. Load testing, +metrics, monitoring and observability will help you explore what those needs are. -> ⓘ The `eoapi-support` chart in this repository (see `../helm-chart/eoapi-support`) is required to be installed to -enable any of the eoAPI service autoscaling. It cannot be listed as a dependecy of `eoapi` chart -b/c of the limitations in `prometheus-adapter` and `grafana` for constructing the Prometheus internal +> ⓘ The `eoapi-support` chart in this repository (see `../charts/eoapi-support`) is required to be installed to +enable any of the eoAPI service autoscaling. It cannot be listed as a dependecy of `eoapi` chart +b/c of the limitations in `prometheus-adapter` and `grafana` for constructing the Prometheus internal service domains dynamically. If you are comfortable with k8s you probably only need to `helm install` the support chart and be on your way. Other folks @@ -21,17 +21,17 @@ The following instructions assume you've gone through the [AWS](./docs/aws-eks.m and installed the `eoapi` chart. -1. Go to the [releases section](https://github.com/developmentseed/eoapi-k8s/releases) of this repository and find the latest +1. Go to the [releases section](https://github.com/developmentseed/eoapi-k8s/releases) of this repository and find the latest `eoapi-support-` version to install. The example below assumes we're working with `eoapi-support-0.1.4` -2. Decide on a release name and `namespace` for your support chart. The next steps assume we've +2. Decide on a release name and `namespace` for your support chart. The next steps assume we've chosen a release name of `eoapi-support` and a similar namespace of `eoapi-support` 3. Then do a normal `helm install` but you'll want to parameterize and pass overrides for the prometheus URL to include -the release name and namespace chosen above. This allows other third-party dependencies used in the chart -(`prometheus-adpater` and `grafana`) know where to find the prometheus service internally. This is unfortunately a +the release name and namespace chosen above. This allows other third-party dependencies used in the chart +(`prometheus-adpater` and `grafana`) know where to find the prometheus service internally. This is unfortunately a manual step that cannot be automated ```bash @@ -60,9 +60,9 @@ manual step that cannot be automated service/eoapi-support-kube-state-metrics ClusterIP 10.123.241.247 8080/TCP 79s service/eoapi-support-prometheus-adapter ClusterIP 10.123.249.21 443/TCP 79s service/eoapi-support-prometheus-node-exporter ClusterIP 10.123.249.90 9100/TCP 79s - service/eoapi-support-prometheus-server ClusterIP 10.123.247.255 80/TCP 79s + service/eoapi-support-prometheus-server ClusterIP 10.123.247.255 80/TCP 79s ``` - + 5. If anything in steps 1 through 3 seems confusing then here is a quick bash script to clear it up: @@ -158,16 +158,16 @@ based on the nginx ingress controller's request rate under the `prometheus-adpat metricsQuery: round(sum(rate(<<.Series>>{service="stac",path=~"/stac.*",<<.LabelMatchers>>}[5m])) by (<<.GroupBy>>), 0.001) ``` -Prometheus adapter is a bridge for metrics between Prometheus (which scrapes nginx) and the k8s metrics server so it can autoscale deployments using these custom metrics. +Prometheus adapter is a bridge for metrics between Prometheus (which scrapes nginx) and the k8s metrics server so it can autoscale deployments using these custom metrics. If you've chosen `both` or `requestRate` as a autoscaling `type:` for those values then these custom metrics are used to template an `hpa.yaml` for each service ### Log into Grafana When you `helm install` the support chart you by default get a Grafana dashboard set up with different default metrics charts -to help you load test and explore your service autoscaling. Grafana creates a new username `admin` and password for you +to help you load test and explore your service autoscaling. Grafana creates a new username `admin` and password for you that you'll have to retrieve to login. -> ⓘ Note that the `service/eoapi-support-grafana` has an EXTERNAL-IP that we can use to view it. +> ⓘ Note that the `service/eoapi-support-grafana` has an EXTERNAL-IP that we can use to view it. This is just a quick way to work with it. You'll want to set it up with an ingress in the future @@ -180,17 +180,17 @@ with the `release` name we installed the chart with below `-grafan kubectl get secret eoapi-support-grafana --template='{{index .data "admin-password"}}' -n eoapi | base64 -d # ``` - + 2. To find the URL for the load balancer for where to log in with Grafana you can query the services: ```sh kubectl get svc -n eoapi-support ``` - + 3. Login and you should be default be able to see the eoapi-k8s grafana dashboard ![](./images/gfdashboard.png) - + ### Install or Upgrade Autoscaling Changes to `eoapi` Chart 1. If you haven't already decide which services (`vector` || `raster` || `stac`) you want to enable `autoscaling` on change your values yaml for these and redeploy @@ -227,7 +227,7 @@ with the `release` name we installed the chart with below `-grafan cpu: "256m" memory: "1024Mi" ``` - + 2. Review what the heck the unit `m` means for your [autoscaling values in the k8s docs](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#quantities) @@ -257,7 +257,7 @@ to set up a simple host ```sh kubectl edit ingress nginx-service-ingress-shared-eoapi -n eoapi ``` - + ```yaml # BEFORE spec: @@ -288,4 +288,4 @@ And then finally roll out the deployment. --- -### Now move onto the [Load Testing](loadtesting.md) document \ No newline at end of file +### Now move onto the [Load Testing](loadtesting.md) document diff --git a/docs/health.md b/docs/health.md index 71ddb3d2..c7c185e0 100644 --- a/docs/health.md +++ b/docs/health.md @@ -1,8 +1,8 @@ # Health checks and liveness probes -All services in eoAPI have endpoints for basic health checks. -The deployment template includes instructions for these checks to get pinged on a regular basis - look for `livenessProbe` -in https://github.com/developmentseed/eoapi-k8s/blob/main/helm-chart/eoapi/templates/services/deployment.yaml +All services in eoAPI have endpoints for basic health checks. +The deployment template includes instructions for these checks to get pinged on a regular basis - look for `livenessProbe` +in https://github.com/developmentseed/eoapi-k8s/blob/main/charts/eoapi/templates/services/deployment.yaml If you are using the default ingress setup, the health endpoints are: diff --git a/docs/helm-install.md b/docs/helm-install.md index 08ffd420..91a152da 100644 --- a/docs/helm-install.md +++ b/docs/helm-install.md @@ -17,8 +17,8 @@ ```bash $ helm search repo eoapi --versions NAME CHART VERSION APP VERSION DESCRIPTION - eoapi/eoapi 0.2.14 0.3.1 Create a full Earth Observation API with Metada... - eoapi/eoapi 0.1.13 0.2.11 Create a full Earth Observation API with Metada... + eoapi/eoapi 0.7.5 5.0.2 Create a full Earth Observation API with Metada... + eoapi/eoapi 0.7.4 5.0.2 Create a full Earth Observation API with Metada... ``` 3. Optionally override keys/values in the default `values.yaml` with a custom `config.yaml` like below: @@ -37,10 +37,10 @@ 4. Then `helm install` with those `config.yaml` values: ```bash - $ helm install -n eoapi --create-namespace eoapi eoapi/eoapi --version 0.1.2 -f config.yaml + $ helm install -n eoapi --create-namespace eoapi eoapi/eoapi --version 0.7.5 -f config.yaml ``` -5. or check out this repo and `helm install` from this repo's `helm-chart/` folder: +5. or check out this repo and `helm install` from this repo's `charts/` folder: ```bash ###################################################### @@ -48,7 +48,7 @@ ###################################################### $ export GITSHA=$(git rev-parse HEAD | cut -c1-10) - $ cd ./helm-chart + $ cd ./charts $ helm install \ --namespace eoapi \ diff --git a/docs/release.md b/docs/release.md index edf4d74c..017dbbcd 100644 --- a/docs/release.md +++ b/docs/release.md @@ -1,7 +1,7 @@ ### Release Workflow -1. PRs that include changes in the `helm-chart/ || || ` charts are manually required to consider -whether their changes are major, minor or patch (in terms of semantic versioning) and bump the appropriate +1. PRs that include changes in the `charts/ || || ` charts are manually required to consider +whether their changes are major, minor or patch (in terms of semantic versioning) and bump the appropriate chart `version: ` (which follows semver) and `appVersion: ` (which does not follow semver) for each affected chart 3. The releaser then merges the above PR @@ -9,17 +9,17 @@ chart `version: ` (which follows semver) and `appVersion: ` (which does not foll 4. Then the releaser should go to the Github release UI/UX and kick off a new release by doing the following: 1. click "Draft New Release" - + 2. create a new tag increment based on the last one that matches the pattern `v..`. This does not have to match any of the chart versions you changed in the above PR. This repository is one-to-many with charts. So in terms of GH release we are saying, "we've release one of the three charts above" and the commit message will reflect that - + 3. click the "Generate release notes" - + 4. review the release notes and clean up and makes sure talk about which chart you released - + 5. click the "Publish release" 5. This last step then kicks off another GH Actions workflow called "release.yaml" which publishes any helm charts -that had version bumps since the last time +that had version bumps since the last time 6. Verify the release is all good by running `helm repo update && helm search repo eoapi --versions` diff --git a/docs/upgrade.md b/docs/upgrade.md deleted file mode 100644 index 94e9b33d..00000000 --- a/docs/upgrade.md +++ /dev/null @@ -1,130 +0,0 @@ -# Upgrading eoAPI - -## General Upgrade Process - -To upgrade your eoAPI installation, use the standard Helm upgrade command: - -```bash -helm upgrade eoapi devseed/eoapi -``` - -### Notable Changes in 0.7.1 - -#### Ingress Configuration Changes -- Removed `pathType` and `pathSuffix` configurations in favor of controller-specific defaults -- Added separate ingress configuration for STAC browser -- Improved Nginx and Traefik support with controller-specific rewrites - -#### PostgreSQL Cluster Updates -- Added ability to specify cluster name via `postgrescluster.name` -- Improved handling of database secrets with custom cluster names -- Job retry limit increased to 3 attempts for better reliability - -For example, to use a custom cluster name: -```bash -helm upgrade eoapi devseed/eoapi --set postgrescluster.name=my-pgstac -``` - -## Special Considerations for Pre-0.7.0 Versions - -### Database Permission Changes - -When upgrading from a version prior to 0.7.0, there are important database permission changes that need to be handled. In versions before 0.7.0, database schema updates were run with superuser privileges. Starting from 0.7.0, these operations are performed with the eoapi user account. - -### Using the PostgreSQL Subchart - -If you're using the built-in PostgreSQL cluster (default setup), follow these steps: - -1. Specify your current version during the upgrade: -```bash -helm upgrade eoapi devseed/eoapi --set previousVersion=0.6.0 -``` - -This will trigger a special upgrade job that: -- Runs with superuser privileges -- Grants necessary permissions to the eoapi user -- Ensures database schema permissions are properly configured - -### Using an External Database - -If you're using an external PostgreSQL database (postgresql.type set to "external-plaintext" or "external-secret"), you'll need to apply the permission changes manually. Connect to your database with superuser privileges and execute the following SQL: - -```sql -\c your_database_name -CREATE EXTENSION IF NOT EXISTS postgis; -CREATE EXTENSION IF NOT EXISTS btree_gist; -CREATE EXTENSION IF NOT EXISTS unaccent; -CREATE ROLE pgstac_admin; -CREATE ROLE pgstac_read; -CREATE ROLE pgstac_ingest; -ALTER DATABASE your_database_name OWNER TO your_eoapi_user; -ALTER USER your_eoapi_user SET search_path TO pgstac, public; -ALTER DATABASE your_database_name set search_path to pgstac, public; -GRANT CONNECT ON DATABASE your_database_name TO your_eoapi_user; -GRANT ALL PRIVILEGES ON TABLES TO your_eoapi_user; -GRANT ALL PRIVILEGES ON SEQUENCES TO your_eoapi_user; -GRANT pgstac_read TO your_eoapi_user WITH ADMIN OPTION; -GRANT pgstac_ingest TO your_eoapi_user WITH ADMIN OPTION; -GRANT pgstac_admin TO your_eoapi_user WITH ADMIN OPTION; -``` - -Replace: -- `your_database_name` with your database name (default: eoapi) -- `your_eoapi_user` with your eoapi user name (default: eoapi) - -### Upgrade Steps - -1. First, check your current version: -```bash -helm list -n eoapi -``` - -2. If you're running a version earlier than 0.7.0: - - For subchart users: - ```bash - export CURRENT_VERSION=$(helm list -n eoapi -o json | jq -r '.[].app_version') - helm upgrade eoapi devseed/eoapi \ - --set previousVersion=$CURRENT_VERSION \ - --namespace eoapi - ``` - - For external database users: - Execute the SQL script shown above with superuser privileges. - -3. Verify the upgrade: -```bash -# Check that all pods are running -kubectl get pods -n eoapi - -# For subchart users, check the upgrade job status: -kubectl get jobs -n eoapi | grep eoapi-superuser-init-db -``` - -### Troubleshooting - -If you encounter issues during the upgrade: - -1. For subchart users, check the upgrade job logs: -```bash -kubectl logs -n eoapi -l app=pgstac-eoapi-superuser-init-db -``` - -2. Verify database permissions: -```bash -# Connect to your database (method varies based on setup) -psql -U your_superuser -d your_database_name - -# Check role permissions -\du - -# Verify extensions -\dx - -# Check database owner -\l -``` - -For external databases, ensure: -- You have superuser privileges when executing the permission script -- All extensions are properly installed -- The database owner is correctly set -- The eoapi user has all necessary role memberships diff --git a/helm-chart/eoapi/logo.png b/helm-chart/eoapi/logo.png deleted file mode 100644 index d65eb5a4..00000000 Binary files a/helm-chart/eoapi/logo.png and /dev/null differ diff --git a/iac/aws/README.md b/iac/aws/README.md deleted file mode 100644 index d05e2535..00000000 --- a/iac/aws/README.md +++ /dev/null @@ -1 +0,0 @@ -please refer to https://github.com/developmentseed/eoapi-k8s-terraform \ No newline at end of file diff --git a/iac/gcp/README.md b/iac/gcp/README.md deleted file mode 100644 index d05e2535..00000000 --- a/iac/gcp/README.md +++ /dev/null @@ -1 +0,0 @@ -please refer to https://github.com/developmentseed/eoapi-k8s-terraform \ No newline at end of file diff --git a/helm-chart/eoapi/helm-template.sh b/scripts/helm-template.sh similarity index 100% rename from helm-chart/eoapi/helm-template.sh rename to scripts/helm-template.sh diff --git a/ingest.sh b/scripts/ingest.sh similarity index 100% rename from ingest.sh rename to scripts/ingest.sh diff --git a/scripts/release.sh b/scripts/release.sh index f8466815..9a4cb5cb 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -11,11 +11,9 @@ helm upgrade --install \ eoapi/eoapi-support --version 0.1.5 \ --set prometheus-adapter.prometheus.url=$PROMETHEUS_SERVER \ --set grafana.datasources.datasources\\.yaml.datasources[0].url=$PROMETHEUS_SERVER \ - -f /Users/ranchodeluxe/apps/eoapi-k8s/helm-chart/eoapi-support/values.yaml + -f ./charts/eoapi-support/values.yaml helm upgrade --install \ -n $RELEASE_NS --create-namespace $RELEASE_NAME \ eoapi/eoapi --version 0.4.8 \ - -f /Users/ranchodeluxe/apps/eoapi-k8s/helm-chart/eoapi/values.yaml - - + -f ./charts/eoapi/values.yaml diff --git a/helm-chart/eoapi/rm-ci-releases.sh b/scripts/rm-ci-releases.sh similarity index 100% rename from helm-chart/eoapi/rm-ci-releases.sh rename to scripts/rm-ci-releases.sh