diff --git a/.github/workflows/chart-lint-test.yaml b/.github/workflows/chart-lint-test.yaml index c19789fb..750ea19c 100644 --- a/.github/workflows/chart-lint-test.yaml +++ b/.github/workflows/chart-lint-test.yaml @@ -10,26 +10,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Helm - uses: azure/setup-helm@v3 - with: - version: v3.8.1 + uses: azure/setup-helm@v4 # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and # yamllint (https://github.com/adrienverge/yamllint) which require Python - name: Set up Python - uses: actions/setup-python@v5.1.0 + uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.13 - name: Set up chart-testing - uses: helm/chart-testing-action@v2.2.1 - with: - version: v3.5.1 + uses: helm/chart-testing-action@v2 - name: Run chart-testing (list-changed) id: list-changed @@ -43,7 +39,7 @@ jobs: run: ct lint --config ct.yaml - name: Create kind cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml index fa572724..6e6540f8 100644 --- a/.github/workflows/chart-release.yaml +++ b/.github/workflows/chart-release.yaml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -27,12 +27,10 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 - with: - version: v3.13.0 + uses: azure/setup-helm@v4 - name: Run chart-releaser - uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 + uses: helm/chart-releaser-action@v1 with: charts_dir: charts config: cr.yaml diff --git a/.github/workflows/generate-chart-readme.yaml b/.github/workflows/generate-chart-readme.yaml index affc40cf..c68bf40c 100644 --- a/.github/workflows/generate-chart-readme.yaml +++ b/.github/workflows/generate-chart-readme.yaml @@ -17,7 +17,7 @@ jobs: - name: Install readme-generator-for-helm run: npm install -g @bitnami/readme-generator-for-helm - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@v4 with: path: charts ref: ${{github.event.pull_request.head.ref}} diff --git a/.github/workflows/publish-ci-docker-image.yml b/.github/workflows/publish-ci-docker-image.yml index 5df4fd48..cc0de246 100644 --- a/.github/workflows/publish-ci-docker-image.yml +++ b/.github/workflows/publish-ci-docker-image.yml @@ -6,9 +6,9 @@ jobs: publish-ci-docker-image: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/publish-deb-package.yml b/.github/workflows/publish-deb-package.yml index dbb7abd8..7d8ee8b2 100644 --- a/.github/workflows/publish-deb-package.yml +++ b/.github/workflows/publish-deb-package.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set package version if: github.event_name == 'push' # For push event run: | @@ -27,7 +27,7 @@ jobs: - name: Set package version (manual dispatch) if: github.event_name == 'workflow_dispatch' # For manual dispatch run: echo "packageVersion=${{ github.event.inputs.packageVersion }}" >> "$GITHUB_ENV" - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@v1 with: toolchain: stable - name: Install dependencies diff --git a/charts/pgcat/Chart.yaml b/charts/pgcat/Chart.yaml index 430c839b..d91c1f21 100644 --- a/charts/pgcat/Chart.yaml +++ b/charts/pgcat/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: PostgresML email: team@postgresml.org appVersion: "1.2.0" -version: 0.2.5 +version: 0.3.0 diff --git a/charts/pgcat/templates/deployment.yaml b/charts/pgcat/templates/deployment.yaml index 84c57f1b..1ca1b328 100644 --- a/charts/pgcat/templates/deployment.yaml +++ b/charts/pgcat/templates/deployment.yaml @@ -36,6 +36,9 @@ spec: - name: pgcat containerPort: {{ .Values.configuration.general.port }} protocol: TCP + - name: metrics + containerPort: {{ .Values.configuration.general.prometheus_exporter_port }} + protocol: TCP livenessProbe: tcpSocket: port: pgcat diff --git a/charts/pgcat/templates/prometheus_exporter.yaml b/charts/pgcat/templates/prometheus_exporter.yaml new file mode 100644 index 00000000..5c640174 --- /dev/null +++ b/charts/pgcat/templates/prometheus_exporter.yaml @@ -0,0 +1,18 @@ +{{- if .Values.configuration.general.enable_prometheus_exporter }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "pgcat.fullname" . }} + labels: + {{- include "pgcat.labels" . | nindent 4 }} +spec: + podMetricsEndpoints: + - interval: 10s + path: /metrics + scheme: http + targetPort: {{ .Values.configuration.general.prometheus_exporter_port }} + selector: + matchLabels: + app.kubernetes.io/instance: pgcat + app.kubernetes.io/name: pgcat +{{- end }}