diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..dbffe29 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,87 @@ +name: CI + +on: + pull_request: + branches: + - "main" + push: + branches: + - "main" + +jobs: + + helm: + name: Helm chart + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Lint + run: | + docker run --rm --interactive --network host \ + --name ct-lint \ + --volume $PWD:/workdir \ + --workdir /workdir \ + quay.io/helmpack/chart-testing:v3.10.1 sh -c 'git config --global --add safe.directory /workdir \ + && helm repo add bitnami https://charts.bitnami.com/bitnami \ + && helm repo add apisix https://charts.apiseven.com \ + && ct lint \ + --charts charts/api7 \ + --charts charts/gateway \ + --charts charts/ingress-controller' + + - name: Setup Kubernetes + uses: engineerd/setup-kind@v0.5.0 + with: + version: v0.22.0 + image: kindest/node:v1.31.0 + + - name: Test install charts + run: | + kubectl cluster-info + docker run --rm --interactive --network host \ + --name ct \ + --volume $HOME/.kube/config:/root/.kube/config \ + --volume $PWD:/workdir \ + --workdir /workdir \ + quay.io/helmpack/chart-testing:v3.10.1 sh -c 'git config --global --add safe.directory /workdir \ + && helm repo add bitnami https://charts.bitnami.com/bitnami \ + && helm repo add apisix https://charts.apiseven.com \ + && ct install \ + --charts charts/api7 \ + --charts charts/ingress-controller' + + - name: Test gateway charts + run: | + kubectl cluster-info + docker run --rm --interactive --network host \ + --name ct \ + --volume $HOME/.kube/config:/root/.kube/config \ + --volume $PWD:/workdir \ + --workdir /workdir \ + quay.io/helmpack/chart-testing:v3.10.1 sh -c 'git config --global --add safe.directory /workdir \ + && helm repo add bitnami https://charts.bitnami.com/bitnami \ + && helm repo add apisix https://charts.apiseven.com \ + && ct install \ + --charts charts/gateway --helm-extra-set-args "--set etcd.enabled=true"' + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.23' + + - name: Run helm-docs + run: | + go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.13.1 + helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts + DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/*/README.md) + if [ ! -z "$DIFF" ]; then + echo "Please use helm-docs in your clone, of your fork, of the project, and commit an updated README.md for the chart." + echo "$DIFF" + exit 1 + fi diff --git a/charts/api7/Chart.yaml b/charts/api7/Chart.yaml index aed3c17..87646fe 100644 --- a/charts/api7/Chart.yaml +++ b/charts/api7/Chart.yaml @@ -23,6 +23,11 @@ version: 0.17.20 # It is recommended to use it with quotes. appVersion: "3.8.10" +maintainers: + - name: API7 + email: support@api7.ai + url: https://api7.ai + dependencies: - name: prometheus condition: prometheus.builtin diff --git a/charts/api7/README.md b/charts/api7/README.md index f62b715..1c2f48e 100644 --- a/charts/api7/README.md +++ b/charts/api7/README.md @@ -4,6 +4,12 @@ A Helm chart for Kubernetes +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| API7 | | | + ## Requirements | Repository | Name | Version | diff --git a/charts/api7/values.yaml b/charts/api7/values.yaml index ebdf229..8af6c0b 100644 --- a/charts/api7/values.yaml +++ b/charts/api7/values.yaml @@ -235,7 +235,7 @@ prometheus: registry: docker.io repository: api7/prometheus tag: 2.48.1-debian-11-r0 - existingSecret: "" # name of existing secret to mount the path of prometheus client certs. + existingSecret: "" # name of existing secret to mount the path of prometheus client certs. enableRemoteWriteReceiver: true enableAdminAPI: true serviceAccount: @@ -305,15 +305,15 @@ dashboard_configuration: prometheus: addr: "http://api7-prometheus-server:9090" timeout: "30s" - basic_auth: # access the prometheus with basic-auth - username: "" # Basic-auth username. If the username is empty, basic-auth authentication is not performed when requesting prometheus. + basic_auth: # access the prometheus with basic-auth + username: "" # Basic-auth username. If the username is empty, basic-auth authentication is not performed when requesting prometheus. password: "" tls: server_name: "" insecure_skip_verify: false enable_client_cert: false key_file: "" # the file path of the private key for requesting prometheus, (e.g. /app/prometheus/certs/tls.key) - cert_file: "" # the file path of the certificate for requesting prometheus, (e.g. /app/prometheus/certs/tls.crt) + cert_file: "" # the file path of the certificate for requesting prometheus, (e.g. /app/prometheus/certs/tls.crt) ca_file: "" # the file path of the ca to verify the prometheus tls server. (e.g. /app/prometheus/certs/ca.crt) whitelist: - "/api/v1/query_range" @@ -370,15 +370,15 @@ dp_manager_configuration: prometheus: addr: "http://api7-prometheus-server:9090" timeout: "30s" - basic_auth: # access the prometheus with basic-auth - username: "" # Basic-auth username. If the username is empty, basic-auth authentication is not performed when requesting prometheus. + basic_auth: # access the prometheus with basic-auth + username: "" # Basic-auth username. If the username is empty, basic-auth authentication is not performed when requesting prometheus. password: "" tls: server_name: "" insecure_skip_verify: false enable_client_cert: false key_file: "" # the file path of the private key for requesting prometheus, (e.g. /app/prometheus/certs/tls.key) - cert_file: "" # the file path of the certificate for requesting prometheus, (e.g. /app/prometheus/certs/tls.crt) + cert_file: "" # the file path of the certificate for requesting prometheus, (e.g. /app/prometheus/certs/tls.crt) ca_file: "" # the file path of the ca to verify the prometheus tls server. (e.g. /app/prometheus/certs/ca.crt) consumer_cache: size: 50000 diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index 6b3a144..bfd6161 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -21,6 +21,11 @@ version: 0.2.22 # follow Semantic Versioning. They should reflect the version the application is using. appVersion: "3.8.10" +maintainers: + - name: API7 + email: support@api7.ai + url: https://api7.ai + dependencies: - name: etcd version: 8.7.7 diff --git a/charts/ingress-controller/Chart.yaml b/charts/ingress-controller/Chart.yaml index 0f69c56..cb519d6 100644 --- a/charts/ingress-controller/Chart.yaml +++ b/charts/ingress-controller/Chart.yaml @@ -8,5 +8,9 @@ keywords: type: application version: 0.1.9 appVersion: 2.0.4 +maintainers: + - name: API7 + email: support@api7.ai + url: https://api7.ai sources: - https://github.com/api7/api7-helm-chart diff --git a/charts/ingress-controller/README.md b/charts/ingress-controller/README.md index 80387d3..d8e8a1b 100644 --- a/charts/ingress-controller/README.md +++ b/charts/ingress-controller/README.md @@ -4,6 +4,12 @@ Ingress Controller for API7 +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| API7 | | | + ## Source Code *