Compare commits

...

547 Commits

Author SHA1 Message Date
Stefan Prodan
b501abd1f0 Merge pull request #470 from stefanprodan/release-6.11.2
Release 6.11.2
2026-03-31 22:52:14 +03:00
Stefan Prodan
e0a79a4ddd Release 6.11.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-31 22:47:19 +03:00
Stefan Prodan
be8baac695 Merge pull request #468 from stefanprodan/dependabot/github_actions/actions-6b017b3799
build(deps): bump the actions group across 1 directory with 4 updates
2026-03-31 22:36:36 +03:00
dependabot[bot]
f539517440 build(deps): bump the actions group across 1 directory with 4 updates
Bumps the actions group with 4 updates in the / directory: [azure/setup-helm](https://github.com/azure/setup-helm), [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer), [fluxcd/flux2](https://github.com/fluxcd/flux2) and [azure/setup-kubectl](https://github.com/azure/setup-kubectl).


Updates `azure/setup-helm` from 4 to 5
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/v4...v5)

Updates `sigstore/cosign-installer` from 4.0.0 to 4.1.1
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v4.0.0...v4.1.1)

Updates `fluxcd/flux2` from 2.8.1 to 2.8.3
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.8.1...v2.8.3)

Updates `azure/setup-kubectl` from 4 to 5
- [Release notes](https://github.com/azure/setup-kubectl/releases)
- [Changelog](https://github.com/Azure/setup-kubectl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-kubectl/compare/v4...v5)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: fluxcd/flux2
  dependency-version: 2.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: azure/setup-kubectl
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-31 19:32:43 +00:00
Stefan Prodan
01219a196e Merge pull request #469 from stefanprodan/pin-actions
ci: Pin actions and enable release attentions
2026-03-31 22:30:33 +03:00
Stefan Prodan
b9acae4064 ci: Pin actions and enable release attentions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-31 22:27:07 +03:00
Stefan Prodan
64a8da1836 Merge pull request #467 from stefanprodan/dependabot/go_modules/google.golang.org/grpc-1.79.3
build(deps): bump google.golang.org/grpc from 1.79.1 to 1.79.3
2026-03-31 19:08:11 +03:00
dependabot[bot]
420d0db8bf build(deps): bump google.golang.org/grpc from 1.79.1 to 1.79.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.1 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.1...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 02:41:57 +00:00
Stefan Prodan
6b67f2bdd6 Merge pull request #454 from hansbogert/master
feat: add otlp logging support
2026-03-17 09:22:56 +02:00
Hans van den Bogert
095b1cd251 feat: add otlp logging support
- Adds a loggerprovider based on otlp logger
- In demo directory of oltp:
  - Added grafana for unified view of both traces and logs
  - tracing now uses oltp from the collector to the jaeger instance

Signed-off-by: Hans van den Bogert <hansbogert@gmail.com>
2026-03-14 22:38:14 +01:00
Stefan Prodan
0a27dbe40c Merge pull request #465 from stefanprodan/release-6.11.1
Release 6.11.1
2026-03-14 15:27:35 +02:00
Stefan Prodan
2da74a4ec2 Release 6.11.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-14 15:18:19 +02:00
Stefan Prodan
c7ffdba3bd Merge pull request #461 from stefanprodan/dependabot/github_actions/actions-1590fac0fc
build(deps): bump the actions group with 5 updates
2026-03-14 15:10:39 +02:00
Stefan Prodan
06f7cd3777 Merge pull request #464 from stefanprodan/fix-store-path-traversal
Fix path traversal in `/store` endpoint
2026-03-14 15:08:52 +02:00
Stefan Prodan
620b9b7e2c Fix path traversal in /store endpoint
Validate that the hash URL parameter matches the expected SHA1 hex
format (40 lowercase hex characters) before using it in file path
operations.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-14 15:02:25 +02:00
Stefan Prodan
83deb7fcb7 Merge pull request #463 from stefanprodan/fix-CVE-2025-70849
Fix XSS in `/store` endpoint (CVE-2025-70849)
2026-03-14 14:58:53 +02:00
Stefan Prodan
550ee9f7b9 Fix stored XSS in /store endpoint (CVE-2025-70849)
Set Content-Type to application/octet-stream in storeReadHandler
to prevent Go's content sniffing from serving HTML payloads as
text/html. Add X-Content-Type-Options: nosniff to prevent browsers
from overriding Content-Type via MIME sniffing, and
Content-Security-Policy: default-src 'none' to block script
execution as defense-in-depth.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-14 14:40:55 +02:00
dependabot[bot]
dd185df435 build(deps): bump the actions group with 5 updates
Bumps the actions group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` |
| [docker/login-action](https://github.com/docker/login-action) | `3` | `4` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5` | `6` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` |


Updates `docker/setup-qemu-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

Updates `docker/setup-buildx-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

Updates `docker/login-action` from 3 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

Updates `docker/metadata-action` from 5 to 6
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

Updates `docker/build-push-action` from 6 to 7
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 06:46:46 +00:00
Stefan Prodan
07a524ba01 Merge pull request #460 from stefanprodan/release-6.11.0
Release 6.11.0
2026-03-06 19:50:57 +00:00
Stefan Prodan
5d97df9c89 Release 6.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-06 21:43:50 +02:00
Stefan Prodan
a8cadef09b Merge pull request #459 from stefanprodan/cosign-v3
Sign release artifacts with cosign v3
2026-03-06 19:32:20 +00:00
Stefan Prodan
32f6e3d8c9 Sign release artifacts with cosign v3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-06 21:31:06 +02:00
Stefan Prodan
77dc46241d Merge pull request #458 from matheuscscp/grpcroute
Introduce GRPCRoute in the Helm chart
2026-03-06 19:23:43 +00:00
Matheus Pimenta
3a31e973c0 Introduce GRPCRoute in the Helm chart
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-06 03:44:28 +00:00
Stefan Prodan
e15511a92d Merge pull request #456 from matheuscscp/check-grpc-tls
Introduce `--tls` flag for command `check grpc`
2026-03-03 08:36:06 +02:00
Matheus Pimenta
4656ca0517 Introduce --tls flag for command check grpc
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-03 03:02:20 +00:00
Stefan Prodan
1f66430364 Merge pull request #455 from matheuscscp/ws-check
Introduce podcli check ws command
2026-03-02 20:46:52 +02:00
Matheus Pimenta
117533e329 Introduce podcli check ws command
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-02 17:38:35 +00:00
Stefan Prodan
29827dd944 Merge pull request #453 from stefanprodan/release-6.10.2
Release 6.10.2
2026-03-01 10:22:42 +02:00
Stefan Prodan
9525259938 Release 6.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-01 10:17:39 +02:00
Stefan Prodan
a53ddbcffc Merge pull request #452 from stefanprodan/go-1.26
Build with Go 1.26
2026-03-01 10:15:35 +02:00
Stefan Prodan
e3c8277e58 Update redis to 8.6.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-01 10:10:08 +02:00
Stefan Prodan
420b2f64b8 Build with Go 1.26
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-01 10:05:27 +02:00
Stefan Prodan
0a93807324 Merge pull request #450 from stefanprodan/dependabot/github_actions/actions-9753a9b660
build(deps): bump the actions group with 2 updates
2026-03-01 09:56:59 +02:00
dependabot[bot]
d73d94eec9 build(deps): bump the actions group with 2 updates
Bumps the actions group with 2 updates: [helm/kind-action](https://github.com/helm/kind-action) and [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action).


Updates `helm/kind-action` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.13.0...v1.14.0)

Updates `goreleaser/goreleaser-action` from 6 to 7
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-version: 1.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: goreleaser/goreleaser-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-23 06:56:00 +00:00
Stefan Prodan
a723c9447d Merge pull request #449 from stefanprodan/release-6.10.1
Some checks failed
e2e / kind-timoni (push) Failing after 6s
e2e / kind-helm (push) Failing after 1m57s
test / test (push) Failing after 5m47s
cve-scan / govulncheck (push) Successful in 12m37s
Release v6.10.1
2026-02-03 17:46:37 +02:00
Stefan Prodan
eca2d3a1d9 Release v6.10.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-03 17:42:33 +02:00
Stefan Prodan
2dfda568b2 Merge pull request #448 from matheuscscp/job-ttl
chart: introduce configurable Job hook
2026-02-03 17:39:43 +02:00
Matheus Pimenta
4d7604ab63 chart: introduce configurable Job hook
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-02-03 15:27:53 +00:00
Stefan Prodan
f3c2e57a6f Merge pull request #447 from stefanprodan/release-6.10.0
Some checks failed
e2e / kind-helm (push) Failing after 2m23s
e2e / kind-timoni (push) Failing after 11s
test / test (push) Failing after 23s
cve-scan / govulncheck (push) Successful in 12m20s
Release v6.10.0
2026-02-01 12:34:49 +02:00
Stefan Prodan
8bded1ba80 Release v6.10.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-01 12:30:00 +02:00
Stefan Prodan
da120efc04 Merge pull request #446 from stefanprodan/helm-remove-linkerd
helm: remove linkerd profile
2026-02-01 12:27:17 +02:00
Stefan Prodan
ea672716dd helm: remove linkerd profile
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-01 12:22:40 +02:00
Stefan Prodan
47742372b9 Merge pull request #441 from darox/add-external-traffic-policy
helm: add externalTrafficPolicy value
2026-02-01 12:13:50 +02:00
Stefan Prodan
30be5f5b6a Merge pull request #445 from stefanprodan/update-go-deps
Update dependencies
2026-02-01 12:12:22 +02:00
Stefan Prodan
4fb3be1de0 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-01 12:08:25 +02:00
Stefan Prodan
d532cc2a24 Merge pull request #444 from stefanprodan/deploy-database-demo
Add database deployment demo
2026-02-01 11:56:08 +02:00
Stefan Prodan
f1eb631ac9 Add database deployment demo
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-01 11:45:23 +02:00
darox
03172452ee service: add externalTrafficPolicy value
Signed-off-by: darox <maderdario@gmail.com>
2025-12-22 14:26:32 +01:00
Stefan Prodan
b6b680fe50 Merge pull request #439 from stefanprodan/release-6.9.4
Some checks failed
cve-scan / govulncheck (push) Successful in 12m0s
e2e / kind-helm (push) Failing after 1m13s
e2e / kind-timoni (push) Failing after 7s
test / test (push) Failing after 5m32s
Release 6.9.4
2025-12-07 20:02:41 +00:00
Stefan Prodan
e51374c0ec Release 6.9.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-12-07 21:58:53 +02:00
Stefan Prodan
80b5bf5495 Merge pull request #438 from stefanprodan/fix-httproute
helm: Add namespace to HTTPRoute
2025-12-07 19:52:57 +00:00
Stefan Prodan
f53a3109cf helm: Add namespace to HTTPRoute
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-12-07 21:46:51 +02:00
Stefan Prodan
11b7ac4319 Merge pull request #436 from stefanprodan/dependabot/github_actions/actions-27fc00b90e
build(deps): bump fluxcd/flux2 from 2.7.4 to 2.7.5 in the actions group
2025-12-07 19:45:44 +00:00
Stefan Prodan
396a56493b Merge pull request #424 from darox/helm-add-trafficDistribution
helm: add trafficDistribution to service spec
2025-12-07 19:43:18 +00:00
darox
4991d2e6d0 helm: add trafficDistribution and additionalLabels to service config
This commit adds the trafficDistribution
and additionalLabels parameters to the Helm
chart's service configuration.

Signed-off-by: darox <maderdario@gmail.com>
2025-12-04 08:57:50 +01:00
dependabot[bot]
c0669703ab build(deps): bump fluxcd/flux2 from 2.7.4 to 2.7.5 in the actions group
Bumps the actions group with 1 update: [fluxcd/flux2](https://github.com/fluxcd/flux2).


Updates `fluxcd/flux2` from 2.7.4 to 2.7.5
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.7.4...v2.7.5)

---
updated-dependencies:
- dependency-name: fluxcd/flux2
  dependency-version: 2.7.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 06:51:24 +00:00
Stefan Prodan
0f360bb788 Merge pull request #434 from stefanprodan/gha-disk-cleanup
Some checks failed
cve-scan / govulncheck (push) Successful in 11m52s
e2e / kind-helm (push) Failing after 1m21s
e2e / kind-timoni (push) Failing after 11s
test / test (push) Failing after 5m30s
ci: Free disk space on Ubuntu runners
2025-11-28 16:18:18 +02:00
Stefan Prodan
d7fee06b63 ci: Free disk space on Ubuntu runners
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-11-28 16:12:49 +02:00
Stefan Prodan
4f64661bff Merge pull request #433 from stefanprodan/dependabot/github_actions/actions-42767b8147
Some checks failed
cve-scan / govulncheck (push) Successful in 11m41s
e2e / kind-helm (push) Failing after 57s
e2e / kind-timoni (push) Failing after 7s
test / test (push) Failing after 5m14s
build(deps): bump the actions group across 1 directory with 2 updates
2025-11-26 11:32:14 +02:00
dependabot[bot]
1318ba1bd1 build(deps): bump the actions group across 1 directory with 2 updates
Bumps the actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [fluxcd/flux2](https://github.com/fluxcd/flux2).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

Updates `fluxcd/flux2` from 2.7.3 to 2.7.4
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.7.3...v2.7.4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: fluxcd/flux2
  dependency-version: 2.7.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 09:14:41 +00:00
Stefan Prodan
1267688401 Merge pull request #432 from stefanprodan/cosign-v2.6.1
ci: Pin cosign to v2.6.1 (Flux compat)
2025-11-26 11:12:51 +02:00
Stefan Prodan
3ed50e4d85 ci: Pin cosign to v2.6.1 (Flux compat)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-11-26 10:27:12 +02:00
Stefan Prodan
d9fec9778d Merge pull request #430 from stefanprodan/release-6.9.3
Some checks failed
cve-scan / govulncheck (push) Successful in 11m40s
e2e / kind-helm (push) Failing after 1m13s
e2e / kind-timoni (push) Failing after 8s
test / test (push) Failing after 5m20s
Release 6.9.3
2025-11-22 14:24:39 +02:00
Stefan Prodan
7ac390bb27 Release 6.9.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-11-22 13:59:49 +02:00
Stefan Prodan
576ad0ff2f Merge pull request #429 from stefanprodan/dependabot/github_actions/actions-fa1ae25fd8
Some checks failed
cve-scan / govulncheck (push) Successful in 12m5s
e2e / kind-helm (push) Failing after 2m42s
e2e / kind-timoni (push) Failing after 9s
test / test (push) Failing after 5m19s
build(deps): bump the actions group across 1 directory with 2 updates
2025-11-22 13:55:47 +02:00
dependabot[bot]
74ac24bc86 build(deps): bump the actions group across 1 directory with 2 updates
Bumps the actions group with 2 updates in the / directory: [helm/kind-action](https://github.com/helm/kind-action) and [fluxcd/flux2](https://github.com/fluxcd/flux2).


Updates `helm/kind-action` from 1.12.0 to 1.13.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.12.0...v1.13.0)

Updates `fluxcd/flux2` from 2.7.2 to 2.7.3
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.7.2...v2.7.3)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-version: 1.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: fluxcd/flux2
  dependency-version: 2.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 06:38:39 +00:00
Stefan Prodan
902e62b5f3 Merge pull request #427 from stefanprodan/chart-gateway-api
Some checks failed
test / test (push) Failing after 17s
cve-scan / govulncheck (push) Failing after 26s
e2e / kind-helm (push) Failing after 19s
e2e / kind-timoni (push) Failing after 8s
chart: Add support for Gateway API HTTPRoute
2025-10-24 12:50:27 +01:00
Stefan Prodan
6a069aed1a chart: Add support for Gateway API HTTPRoute
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-10-24 14:43:05 +03:00
Stefan Prodan
bca20328fb Merge pull request #420 from stefanprodan/dependabot/github_actions/actions-6d9da201ab
Some checks failed
cve-scan / govulncheck (push) Failing after 20s
e2e / kind-helm (push) Failing after 21s
e2e / kind-timoni (push) Failing after 11s
test / test (push) Failing after 22s
build(deps): bump fluxcd/flux2 from 2.6.4 to 2.7.0 in the actions group
2025-10-16 00:30:49 +03:00
dependabot[bot]
d81ac93a8a build(deps): bump fluxcd/flux2 from 2.6.4 to 2.7.0 in the actions group
Bumps the actions group with 1 update: [fluxcd/flux2](https://github.com/fluxcd/flux2).


Updates `fluxcd/flux2` from 2.6.4 to 2.7.0
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.6.4...v2.7.0)

---
updated-dependencies:
- dependency-name: fluxcd/flux2
  dependency-version: 2.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-15 21:23:11 +00:00
Stefan Prodan
71fc0d8096 Merge pull request #423 from stefanprodan/chart-updates
chart: Update redis image and allow pull secrets
2025-10-16 00:21:25 +03:00
Stefan Prodan
81654006ee chart: Update redis image and allow pull secrets
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-10-16 00:17:07 +03:00
Stefan Prodan
c74b0d4ccb Merge pull request #422 from stefanprodan/update-deps-chart
Update Go dependencies
2025-10-16 00:16:57 +03:00
Stefan Prodan
e335313b04 Update Go dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-10-16 00:06:37 +03:00
Stefan Prodan
ca375ee533 Merge pull request #421 from sicko583/enable-imagepullsecrets-for-deployments
enable imagepullsecrets for better image pull
2025-10-15 23:55:46 +03:00
lincheng.zhong
d8e8054876 enable imagepullsecrets for better image pull 2025-10-15 20:09:50 +08:00
Stefan Prodan
e86405a867 Merge pull request #417 from stefanprodan/release-6.9.2
Some checks failed
test / test (push) Failing after 26s
cve-scan / govulncheck (push) Failing after 38s
e2e / kind-helm (push) Failing after 25s
e2e / kind-timoni (push) Failing after 17s
Release 6.9.2
2025-09-10 23:09:01 +03:00
Stefan Prodan
a51de59edb Release 6.9.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-09-10 23:06:10 +03:00
Stefan Prodan
1ff6fff334 Merge pull request #416 from stefanprodan/go-1.25
Build with Go 1.25
2025-09-10 23:04:21 +03:00
Stefan Prodan
98e8cd39d4 Build with Go 1.25
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-09-10 22:51:09 +03:00
Stefan Prodan
65b9e92db3 Merge pull request #414 from stefanprodan/dependabot/github_actions/actions-b5ac1ad0b0
build(deps): bump the actions group across 1 directory with 3 updates
2025-09-10 22:45:04 +03:00
dependabot[bot]
c6536c75ce build(deps): bump the actions group across 1 directory with 3 updates
Bumps the actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [stefanprodan/timoni](https://github.com/stefanprodan/timoni) and [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

Updates `stefanprodan/timoni` from 0.25.1 to 0.25.2
- [Release notes](https://github.com/stefanprodan/timoni/releases)
- [Changelog](https://github.com/stefanprodan/timoni/blob/main/.goreleaser.yml)
- [Commits](https://github.com/stefanprodan/timoni/compare/v0.25.1...v0.25.2)

Updates `actions/setup-go` from 5 to 6
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: stefanprodan/timoni
  dependency-version: 0.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 19:29:40 +00:00
Stefan Prodan
3c4910d1c7 Merge pull request #415 from stefanprodan/fix-chart-values-prod
chart: Fix values-prod standalone use-case
2025-09-10 22:27:03 +03:00
Stefan Prodan
c831679d1e chart: Fix values-prod standalone use-case
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-09-10 21:18:04 +03:00
Stefan Prodan
94a9f99f79 Merge pull request #412 from stefanprodan/dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
Some checks failed
cve-scan / govulncheck (push) Successful in 12m34s
e2e / kind-helm (push) Failing after 1m38s
e2e / kind-timoni (push) Failing after 10s
test / test (push) Failing after 5m32s
build(deps): bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0
2025-08-22 12:27:47 +03:00
dependabot[bot]
86ac641693 build(deps): bump github.com/go-viper/mapstructure/v2
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 15:28:33 +00:00
Stefan Prodan
cdd09cdd3d Merge pull request #408 from stefanprodan/release-6.9.1
Some checks failed
cve-scan / govulncheck (push) Successful in 13m6s
e2e / kind-helm (push) Failing after 1m46s
e2e / kind-timoni (push) Failing after 18s
test / test (push) Failing after 6m5s
Release 6.9.1
2025-07-12 14:07:13 +03:00
Stefan Prodan
0b8a7dace7 Release 6.9.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-12 14:03:55 +03:00
Stefan Prodan
e50f88a43d Merge pull request #404 from stefanprodan/dependabot/github_actions/actions-1b82273ac1
build(deps): bump fluxcd/flux2 from 2.6.1 to 2.6.4 in the actions group
2025-07-12 14:02:14 +03:00
dependabot[bot]
67e4628d95 build(deps): bump fluxcd/flux2 from 2.6.1 to 2.6.2 in the actions group
Bumps the actions group with 1 update: [fluxcd/flux2](https://github.com/fluxcd/flux2).


Updates `fluxcd/flux2` from 2.6.1 to 2.6.2
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: fluxcd/flux2
  dependency-version: 2.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-12 10:59:20 +00:00
Stefan Prodan
73f5e936c8 Merge pull request #407 from stefanprodan/deps-update
Update dependencies
2025-07-12 13:57:04 +03:00
Stefan Prodan
0e26c3b934 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-12 13:39:00 +03:00
Stefan Prodan
dc39bd9a08 Update Alpine to 3.22
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-12 13:06:56 +03:00
Stefan Prodan
c23d57a4e9 Merge pull request #403 from stefanprodan/dependabot/github_actions/actions-45b07363df
Some checks failed
cve-scan / govulncheck (push) Successful in 12m38s
e2e / kind-helm (push) Failing after 1m36s
e2e / kind-timoni (push) Failing after 19s
test / test (push) Failing after 5m41s
build(deps): bump stefanprodan/timoni from 0.25.0 to 0.25.1 in the actions group
2025-06-16 09:41:56 +03:00
dependabot[bot]
85d22b2172 build(deps): bump stefanprodan/timoni in the actions group
Bumps the actions group with 1 update: [stefanprodan/timoni](https://github.com/stefanprodan/timoni).


Updates `stefanprodan/timoni` from 0.25.0 to 0.25.1
- [Release notes](https://github.com/stefanprodan/timoni/releases)
- [Changelog](https://github.com/stefanprodan/timoni/blob/main/.goreleaser.yml)
- [Commits](https://github.com/stefanprodan/timoni/compare/v0.25.0...v0.25.1)

---
updated-dependencies:
- dependency-name: stefanprodan/timoni
  dependency-version: 0.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 06:36:33 +00:00
Stefan Prodan
ff906f2242 Merge pull request #402 from benoittgt/prevent-warning
Some checks failed
cve-scan / govulncheck (push) Successful in 14m42s
e2e / kind-helm (push) Failing after 1m32s
e2e / kind-timoni (push) Failing after 11s
test / test (push) Failing after 5m52s
Prevent warning with `docker buildx build` command
2025-06-12 22:46:33 +03:00
Benoit Tigeot
2dbf735c46 Prevent warning with docker buildx build command
Without this patch
```
 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
```
2025-06-12 21:22:51 +02:00
Stefan Prodan
1318243ec9 Merge pull request #400 from stefanprodan/dependabot/github_actions/actions-d190f23e0c
Some checks failed
cve-scan / govulncheck (push) Successful in 12m56s
e2e / kind-helm (push) Failing after 1m52s
e2e / kind-timoni (push) Failing after 19s
test / test (push) Failing after 5m44s
build(deps): bump the actions group with 2 updates
2025-06-02 10:55:18 +03:00
dependabot[bot]
12e7f14ff0 build(deps): bump the actions group with 2 updates
Bumps the actions group with 2 updates: [fluxcd/flux2](https://github.com/fluxcd/flux2) and [stefanprodan/timoni](https://github.com/stefanprodan/timoni).


Updates `fluxcd/flux2` from 2.5.1 to 2.6.1
- [Release notes](https://github.com/fluxcd/flux2/releases)
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml)
- [Commits](https://github.com/fluxcd/flux2/compare/v2.5.1...v2.6.1)

Updates `stefanprodan/timoni` from 0.24.0 to 0.25.0
- [Release notes](https://github.com/stefanprodan/timoni/releases)
- [Changelog](https://github.com/stefanprodan/timoni/blob/main/.goreleaser.yml)
- [Commits](https://github.com/stefanprodan/timoni/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: fluxcd/flux2
  dependency-version: 2.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: stefanprodan/timoni
  dependency-version: 0.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 07:47:48 +00:00
Stefan Prodan
fb3b01be30 Merge pull request #399 from stefanprodan/release-6.9.0
Some checks failed
cve-scan / govulncheck (push) Successful in 3m56s
e2e / kind-helm (push) Failing after 3m5s
e2e / kind-timoni (push) Failing after 10s
test / test (push) Failing after 1m17s
Release 6.9.0
2025-05-15 12:33:58 +03:00
Stefan Prodan
be955e76b0 Release 6.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-15 12:13:20 +03:00
Stefan Prodan
3e79d79447 Merge pull request #398 from stefanprodan/govulncheck
Run CVE scan with govulncheck
2025-05-15 11:25:02 +03:00
Stefan Prodan
cd555cf439 Run CVE scan with govulncheck
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-15 09:35:42 +03:00
Stefan Prodan
2927336ecd Merge pull request #397 from stefanprodan/dependabot/github_actions/actions-7f661cc7ed
build(deps): bump the actions group with 6 updates
2025-05-15 09:25:47 +03:00
dependabot[bot]
8f5425b6d5 build(deps): bump the actions group with 6 updates
Bumps the actions group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `4` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.10.0` | `1.12.0` |
| [azure/setup-helm](https://github.com/azure/setup-helm) | `3` | `4` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `5` | `6` |
| [azure/setup-kubectl](https://github.com/azure/setup-kubectl) | `3` | `4` |
| [cue-lang/setup-cue](https://github.com/cue-lang/setup-cue) | `1.0.0` | `1.0.1` |


Updates `actions/checkout` from 3 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

Updates `helm/kind-action` from 1.10.0 to 1.12.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.10.0...v1.12.0)

Updates `azure/setup-helm` from 3 to 4
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/v3...v4)

Updates `docker/build-push-action` from 5 to 6
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

Updates `azure/setup-kubectl` from 3 to 4
- [Release notes](https://github.com/azure/setup-kubectl/releases)
- [Changelog](https://github.com/Azure/setup-kubectl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-kubectl/compare/v3...v4)

Updates `cue-lang/setup-cue` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/cue-lang/setup-cue/releases)
- [Commits](https://github.com/cue-lang/setup-cue/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: helm/kind-action
  dependency-version: 1.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: azure/setup-helm
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/build-push-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: azure/setup-kubectl
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: cue-lang/setup-cue
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-14 22:36:04 +00:00
Stefan Prodan
1cd88028c7 Merge pull request #396 from stefanprodan/enable-dependabot
Some checks failed
cve-scan / trivy (push) Failing after 33s
e2e / kind-helm (push) Failing after 2m55s
e2e / kind-timoni (push) Failing after 15s
test / test (push) Failing after 1m21s
Enable dependabot
2025-05-15 01:34:30 +03:00
Stefan Prodan
ca101e6728 Enable dependabot
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-15 01:28:59 +03:00
Stefan Prodan
c8419e386a Merge pull request #395 from stefanprodan/update-deps
Update dependencies
2025-05-15 01:01:54 +03:00
Stefan Prodan
9356c1c0c4 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-15 00:52:02 +03:00
Stefan Prodan
60b5e4c4fe Merge pull request #394 from mkilchhofer/feature/add_namespace_and_namespaceoverride
feat(helm): Add namespace field to all resources
2025-05-15 00:31:33 +03:00
Marco Maurer
322b71c1e5 feat(helm): Add namespace field to all resources
Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
2025-05-14 19:41:49 +02:00
Stefan Prodan
b3396adb98 Merge pull request #390 from stefanprodan/release-6.8.0
Some checks failed
cve-scan / trivy (push) Has been cancelled
e2e / kind-helm (push) Has been cancelled
e2e / kind-timoni (push) Has been cancelled
test / test (push) Has been cancelled
Release v6.8.0
2025-03-11 11:27:59 +02:00
Stefan Prodan
c6e70a7aa0 Release v6.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-03-11 11:23:55 +02:00
Stefan Prodan
6810566623 Merge pull request #389 from stefanprodan/go-1.24
Build with Go 1.24
2025-03-11 11:17:38 +02:00
Stefan Prodan
8efcd73510 Build with Go 1.24
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-03-11 11:13:59 +02:00
Stefan Prodan
eb81ed6ed2 Merge pull request #384 from stefanprodan/update-go-deps
Update dependencies
2025-03-11 11:08:46 +02:00
Stefan Prodan
916f1a298a Merge pull request #388 from hansbogert/master
feat(logging): add trace_id to http request debug logs
2025-03-11 11:03:16 +02:00
Hans van den Bogert
7cc399463c feat(logging): add trace_id to debug log line
... if exists in context
2025-03-10 21:48:25 +01:00
Stefan Prodan
78755636d0 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-01-14 00:09:32 +02:00
Stefan Prodan
b99bf8c252 Merge pull request #382 from cthtrifork/feature/podSecurityContext
Some checks failed
cve-scan / trivy (push) Failing after 9m22s
e2e / kind-helm (push) Failing after 1m14s
e2e / kind-timoni (push) Failing after 13s
test / test (push) Failing after 5m29s
Added support for podSecurityContext in helm chart
2024-11-14 12:19:48 +02:00
Casper Thygesen
e7928cfbc7 update chart readme 2024-11-14 10:45:13 +01:00
Stefan Prodan
dc5d3d559e Merge pull request #381 from stefanprodan/dependabot/go_modules/github.com/golang-jwt/jwt/v4-4.5.1
build(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1
2024-11-14 11:40:24 +02:00
Casper Thygesen
71f618320e Added support for podSecurityContext in helm chart 2024-11-13 20:36:29 +01:00
dependabot[bot]
c4e601b4cb build(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.5.0...v4.5.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-04 23:45:18 +00:00
Stefan Prodan
6b7aab8a10 Merge pull request #378 from stefanprodan/release-6.7.1
Some checks failed
cve-scan / trivy (push) Successful in 6m54s
e2e / kind-helm (push) Failing after 58s
e2e / kind-timoni (push) Failing after 6s
test / test (push) Failing after 5m15s
Release 6.7.1
2024-10-08 11:58:16 +03:00
Stefan Prodan
b7d3d71d8f Release 6.7.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-10-07 16:02:31 +03:00
Stefan Prodan
abcd272293 Merge pull request #377 from stefanprodan/go-1.23
Some checks failed
cve-scan / trivy (push) Successful in 9m22s
e2e / kind-helm (push) Failing after 2m38s
e2e / kind-timoni (push) Failing after 11s
test / test (push) Failing after 6m17s
Build with Go 1.23
2024-10-07 15:59:08 +03:00
Stefan Prodan
4af7854aa2 Bump Go to 1.23
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-10-07 15:56:05 +03:00
Stefan Prodan
fc1e4a48ed Build with Go 1.23
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-10-07 15:50:27 +03:00
Stefan Prodan
08238eada7 Merge pull request #375 from stefanprodan/dependabot/go_modules/google.golang.org/grpc-1.64.1
Some checks failed
e2e / kind-timoni (push) Failing after 4s
cve-scan / trivy (push) Successful in 1m27s
e2e / kind-helm (push) Failing after 3m8s
test / test (push) Failing after 5m38s
build(deps): bump google.golang.org/grpc from 1.64.0 to 1.64.1
2024-07-12 14:59:26 +03:00
dependabot[bot]
892a66ea93 build(deps): bump google.golang.org/grpc from 1.64.0 to 1.64.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-09 21:44:38 +00:00
Stefan Prodan
0b1481aa8e Merge pull request #374 from stefanprodan/release-6.7.0
Release v6.7.0
2024-06-23 21:28:13 +03:00
Stefan Prodan
ff32a1fc4b Release v6.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-23 21:25:38 +03:00
Stefan Prodan
3de84d2360 Merge pull request #373 from stefanprodan/up-go-deps
Update dependencies
2024-06-23 21:24:35 +03:00
Stefan Prodan
ba6f4ffd7c Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-23 21:21:39 +03:00
Stefan Prodan
6d4405a1ef Run tidy before testing
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-23 21:21:25 +03:00
Stefan Prodan
752950cb4f Merge pull request #369 from Prashant-Dwivedi-08-01/grpc_APIs
GRPC Apis for Corresponding HTTP APIs
2024-06-23 21:13:19 +03:00
Prashant Dwivedi
b10c3067c8 Removed the whitespaces
Signed-off-by: Prashant Dwivedi <prashantdwivedi194@gmail.com>
2024-06-23 22:47:58 +05:30
Prashant Dwivedi
85cd1c46d4 Removed unnecessary comments and whitespaces
Signed-off-by: Prashant Dwivedi <prashantdwivedi194@gmail.com>
2024-06-23 21:59:50 +05:30
Prashant Dwivedi
2687a13c75 Merge branch 'stefanprodan:master' into grpc_APIs 2024-06-23 20:46:38 +05:30
Stefan Prodan
5fb6597929 Merge pull request #372 from stefanprodan/set-cue-version
Set CUE version in Timoni module
2024-06-23 15:09:43 +03:00
Stefan Prodan
1fbdd9420f Set CUE version in Timoni module
Adapt module to cope with breaking changes in CUE v0.9

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-23 15:07:18 +03:00
Prashant Dwivedi
30cd3b27d7 Added description for all the gRPC APIs in README file
Signed-off-by: Prashant Dwivedi <prashantdwivedi194@gmail.com>
2024-06-23 11:13:01 +05:30
Stefan Prodan
1d7de0bb82 Merge pull request #370 from maxbrunet/fix/deploy/cache-server-url
fix(deploy): add protocol to Redis URL
2024-06-15 00:28:42 +03:00
Maxime Brunet
c52654c59e fix(deploy): add protocol to Redis URL 2024-06-14 12:10:17 -07:00
Prashant Dwivedi
1a6838a4a2 Merge branch 'master' of github.com:Prashant-Dwivedi-08-01/podinfo into grpc_APIs 2024-06-07 20:27:13 +05:30
Stefan Prodan
b0c487c6b2 Merge pull request #367 from stefanprodan/release-6.6.3
Release v6.6.3
2024-05-23 11:34:11 +03:00
Stefan Prodan
b28069ac51 Release v6.6.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-23 11:30:18 +03:00
Stefan Prodan
d8a136cf74 Merge pull request #366 from stefanprodan/up-deps-otel
Update opentelemetry dependencies
2024-05-23 11:28:58 +03:00
Stefan Prodan
614f74f6df Update opentelemetry dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-23 11:25:26 +03:00
Stefan Prodan
0c4f327390 Merge pull request #365 from stefanprodan/alpine-3.20
Update Alpine to 3.20
2024-05-23 11:22:24 +03:00
Stefan Prodan
d791dedb24 Update Alpine to 3.20
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-23 11:19:15 +03:00
Stefan Prodan
220d4e909c Merge pull request #364 from rodrigorfk/fix-ws-panic
fix: panic when the WebSocket endpoint is under load
2024-05-23 11:17:11 +03:00
Rodrigo Fior Kuntzer
eba7fe186e fix: panic when the WebSocket endpoint is under load 2024-05-23 10:01:01 +02:00
Prashant Dwivedi
9108833214 Added the token Validate api and updated the test for it 2024-05-09 12:56:54 +05:30
Prashant Dwivedi
386ceb09be Added the grpc APIs for the remaining HTTP apis 2024-05-08 00:25:37 +05:30
Stefan Prodan
f350624047 Merge pull request #356 from needsure/master
chore: fix some typos in comments
2024-04-28 14:07:49 +03:00
Stefan Prodan
37ba3e854f Merge pull request #361 from stefanprodan/dependabot/go_modules/golang.org/x/net-0.23.0
build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0
2024-04-19 17:17:36 +03:00
dependabot[bot]
70335812c6 build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 13:23:50 +00:00
Stefan Prodan
8d010c498e Merge pull request #357 from stefanprodan/release-6.6.2
Release v6.6.2
2024-04-10 14:04:54 +03:00
Stefan Prodan
8b3079a417 Release v6.6.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-10 14:01:43 +03:00
needsure
37fa020bcd chore: fix some typos in conments
Signed-off-by: needsure <qinzhipeng@outlook.com>
2024-04-09 16:45:31 +08:00
Stefan Prodan
d879d0f4fb Merge pull request #336 from michaelkebe/remove-localhost
Removed reference to localhost from swagger
2024-04-09 10:14:32 +03:00
Michael Kebe
16191504d1 Removed reference to localhost from swagger
Now it is possible to use the swagger webinterface
running on a host other than localhost e.g. in docker
or kubernetes.

Removed the @host line from pkg/api/server.go and
ran make swagger.

Fixes probably #179
2024-04-09 08:54:38 +02:00
Stefan Prodan
d042732a44 Merge pull request #353 from stefanprodan/release-6.6.1
Release v6.6.1
2024-03-27 15:56:20 +02:00
Stefan Prodan
649864583b Release v6.6.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-03-27 15:36:51 +02:00
Stefan Prodan
c07eb64558 Merge pull request #352 from stefanprodan/go-1.22
Update dependencies to Go 1.22
2024-03-26 14:23:19 +02:00
Stefan Prodan
44942884c3 Update dependencies to Go 1.22
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-03-26 14:19:26 +02:00
Stefan Prodan
d562a2a82a Merge pull request #344 from toyamagu-2021/feat-allow-input-config-and-extraArgs
feat(chart): allow input config and extraArgs
2024-03-26 09:00:43 +02:00
toyamagu2021
d7c1bf015c feat(chart): allow input config and extraArgs
Signed-off-by: toyamagu2021 <toyamagu2021@gmail.com>
2024-03-26 09:28:44 +09:00
Stefan Prodan
cdec0786ef Merge pull request #347 from eltociear/patch-1
Update README.md
2024-03-25 10:14:24 +02:00
Stefan Prodan
e6d611e1e2 Merge pull request #349 from mustafakarci/feature/extraEnv
feature(chart): allow extraEnvs to be parst
2024-03-25 10:14:01 +02:00
Mustafa Karci
36bea810ef feature(chart): allow extraEnvs to be parst 2024-03-20 12:28:40 +01:00
Stefan Prodan
50047dab3a Merge pull request #348 from stefanprodan/dependabot/go_modules/google.golang.org/protobuf-1.33.0
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
2024-03-14 10:36:40 +02:00
dependabot[bot]
2b936e6700 build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:03:41 +00:00
Ikko Eltociear Ashimine
55e4e51eba Update README.md
Github -> GitHub
2024-03-06 00:27:17 +09:00
Stefan Prodan
47090ad9e1 Merge pull request #331 from the-technat/master
feat(helm): add topologySpreadConstraints and PDB
2024-02-28 08:58:04 +00:00
Nathanael Liechti
6a0bbda8a5 feat(helm): add topologySpreadConstraints and PDB 2024-02-26 20:54:29 +00:00
Stefan Prodan
357009a863 Sign only GHCR artifacts with Notation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-02-26 14:00:22 +02:00
Stefan Prodan
0f98770296 Split signature actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-02-26 13:27:46 +02:00
Stefan Prodan
f9032836a6 Merge pull request #343 from stefanprodan/release-6.6.0
Release v6.6.0
2024-02-26 12:17:54 +02:00
Stefan Prodan
5368c3fe10 Release v6.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-02-26 12:15:05 +02:00
Stefan Prodan
b1207aa9b1 Merge pull request #341 from JasonTheDeveloper/feat/notation
feat(notation): sign artifacts using notation
2024-02-26 11:58:49 +02:00
Jason
c7f9b521fa ci(notation): install 1.1.0
Signed-off-by: Jason <jagoodse@microsoft.com>
2024-02-26 20:40:03 +11:00
Stefan Prodan
24405a5a5d Setup notation signing keys
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-02-25 12:12:22 +02:00
Stefan Prodan
5195b158fc Merge pull request #334 from michaelkebe/patch-1
Fixes /store endpoint with the kustomize deployment
2024-02-25 11:31:44 +02:00
Stefan Prodan
532db405f8 Merge pull request #322 from JayKaku/feature/grpc-version-echo-apis
Implement gRPC for `echo` and `version` APIs
2024-02-25 11:30:59 +02:00
JayKaku
2251bee699 Fixed parsing logger in echo_test.go service registeration 2024-02-24 23:44:12 +05:30
JayKaku
8535efccb7 Implemented zap logger in place of log | gprc echo 2024-02-24 23:44:12 +05:30
JayKaku
e008d1f261 Added config, logger for grpc echo api 2024-02-24 23:44:12 +05:30
Jay Kaku
22097353d2 Feature grpc version echo api (#3)
added grpc verion and echo apis

---------

Co-authored-by: Prashant Dwivedi <prashantdwivedi194@gmail.com>
2024-02-24 23:44:12 +05:30
JayKaku
c305843105 restructured api to api/http, api/grpc, pkg http 2024-02-24 23:44:12 +05:30
Jason
0d2c428859 refactor(trustpolicy): jasonthedeveloper -> stefanprodan 2024-02-09 10:59:44 +11:00
Jason
ecaa7cf4d3 ci(release): trigger on tag push 2024-02-09 10:47:11 +11:00
Jason
8447b6985b ci(notation): remove release workflow 2024-02-09 10:42:51 +11:00
Jason
9371d6d153 ci(release): sign artefacts using notation 2024-02-09 10:41:19 +11:00
Jason
20b8c1043c Merge branch 'master' into feat/notation 2024-02-09 10:14:38 +11:00
Michael Kebe
2d80c7a22d added /data to kustomize deployment
Added an emptyDir to the kustomzie deployment, otherwise the /store endpoint does not work for storing files.
2024-01-10 09:44:12 +01:00
Stefan Prodan
dc830d02a6 Enable GitHub Sponsors 2023-12-30 22:18:54 +02:00
Stefan Prodan
badf3271a1 Merge pull request #332 from arunsathiya/master
ci: Use `GITHUB_OUTPUT` instead of set-output
2023-12-29 00:11:06 +02:00
Arun
9f9c2f3245 Use GITHUB_OUTPUT envvar instead of set-output command as the latter is deprecated 2023-12-28 13:21:55 -08:00
Stefan Prodan
33dac1ba40 Merge pull request #329 from stefanprodan/release-6.5.4
Release 6.5.4
2023-12-17 16:44:12 +02:00
Stefan Prodan
1cf8b8aeef Release 6.5.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-17 16:36:33 +02:00
Stefan Prodan
22fb1c3d34 Merge pull request #328 from stefanprodan/timoni-schemas-update
Update Timoni CUE schemas
2023-12-17 16:34:38 +02:00
Stefan Prodan
adf8157da6 Update Timoni CUE schemas
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-17 15:53:22 +02:00
Stefan Prodan
03f8ad0251 Merge pull request #327 from stefanprodan/up-deps
Update Go dependencies
2023-12-17 15:18:23 +02:00
Stefan Prodan
101e371e96 Update Go dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-17 15:14:43 +02:00
Stefan Prodan
53c9f3ad9b Merge pull request #326 from stefanprodan/alpine-3.19
Update Alpine to 3.19
2023-12-17 15:10:30 +02:00
Stefan Prodan
a69f0282fd Update Alpine to 3.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-17 15:07:34 +02:00
Jason
174d183056 refactor(rename): policy.json -> trustpolicy.json 2023-12-14 16:16:12 +11:00
Jason
7bb64e7567 fix(trustpolicy): small typo in registryScopes 2023-12-08 17:30:47 +11:00
Jason
49a4b31d53 feat(notation): update registry scopes 2023-12-07 18:06:52 +11:00
Jason
c29e013a33 feat(notation): add trust store policy 2023-12-07 16:57:04 +11:00
Jason
45ecda63bb ci(release): don't trigger on tag push 2023-12-07 16:26:01 +11:00
Jason
4868f430c7 ci(release): trigger on tag 2023-12-07 16:15:17 +11:00
Jason
ca9c6bb4f8 ci(release): sign artefacts using notaiton 2023-12-07 16:06:40 +11:00
Jason
86f3b1a57c ci(release): create notation config folder 2023-12-07 15:52:29 +11:00
Jason
b22dd96a54 feat(notation): add signingkey.json config 2023-12-07 15:51:22 +11:00
Jason
5aaf95849e ci(release): setup signing keys for notation 2023-12-07 15:50:30 +11:00
Jason
e197eca420 ci(release): add notation release workflow 2023-12-07 15:46:22 +11:00
Stefan Prodan
73fcdbe4a6 Merge pull request #320 from duxinxiao/patch-1
Add comment on sleep during graceful shutdown
2023-11-15 13:32:44 +02:00
du
074d0f9ff2 add comment on sleep during graceful shutdown 2023-11-15 18:47:52 +08:00
Stefan Prodan
d9bc6301e9 Merge pull request #316 from stefanprodan/release-6.5.3
Release 6.5.3
2023-10-30 14:38:28 +02:00
Stefan Prodan
a0e323e331 Release 6.5.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 14:27:41 +02:00
Stefan Prodan
1ee349fa17 Merge pull request #315 from stefanprodan/timoni-tests
timoni: Add connectivity test to module
2023-10-30 14:25:12 +02:00
Stefan Prodan
0f526c3cd4 timoni: Run module tests in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 14:11:41 +02:00
Stefan Prodan
021c55fed9 timoni: Add connectivity test to module
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 14:10:25 +02:00
Stefan Prodan
bb2408d17d Merge pull request #314 from stefanprodan/timoni-vet-module
timoni: Add debug values and vet module in CI
2023-10-30 12:56:48 +02:00
Stefan Prodan
5eb3cafd6a timoni: Vet module in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 12:51:28 +02:00
Stefan Prodan
df0f8ba885 timoni: Add debug values
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 12:51:03 +02:00
Stefan Prodan
19a59d96f1 timoni: Update module schemas
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 12:41:21 +02:00
Stefan Prodan
401461595a Merge pull request #313 from stefanprodan/docs-cosign-verify
docs: Verify podinfo release assets with cosign
2023-10-30 12:32:21 +02:00
Stefan Prodan
bd77584ade docs: Verify podinfo release assets with cosign
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-30 12:28:21 +02:00
Stefan Prodan
87e0dbaa7e Merge pull request #312 from stefanprodan/dependabot/go_modules/google.golang.org/grpc-1.58.3
Bump google.golang.org/grpc from 1.58.2 to 1.58.3
2023-10-26 00:38:00 +03:00
dependabot[bot]
c5494104a1 Bump google.golang.org/grpc from 1.58.2 to 1.58.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 21:27:33 +00:00
Stefan Prodan
74c60a927c Merge pull request #310 from stefanprodan/release-6.5.2
Release 6.5.2
2023-10-12 12:18:47 +03:00
Stefan Prodan
ecdf07c4d5 Release 6.5.2
Fix for CVE-2023-39325 and CVE-2023-38545

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-12 12:11:37 +03:00
Stefan Prodan
ff29c549ff Merge pull request #309 from stefanprodan/dependabot/go_modules/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.15.0 to 0.17.0
2023-10-12 09:24:03 +03:00
dependabot[bot]
fa75fc0520 Bump golang.org/x/net from 0.15.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 23:14:03 +00:00
Stefan Prodan
0bc496456d Merge pull request #307 from stefanprodan/release-6.5.1
Release 6.5.1
2023-10-02 21:04:32 +03:00
Stefan Prodan
398c543171 Release 6.5.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-02 20:58:27 +03:00
Stefan Prodan
a54dc2a9c7 Merge pull request #306 from stefanprodan/update-otel-deps
Update Go dependencies
2023-10-02 20:57:13 +03:00
Stefan Prodan
bfa42afa1f Bump Go to 1.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-02 20:46:06 +03:00
Stefan Prodan
590987704e Update open telemetry packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-02 20:45:20 +03:00
Stefan Prodan
d561182076 Merge pull request #305 from stefanprodan/timoni-v0.14
Update module to Timoni v0.14 APIs
2023-10-02 20:41:06 +03:00
Stefan Prodan
72bd6faf35 Update module to Timoni v0.14 APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-02 20:36:58 +03:00
Stefan Prodan
2cbe0fcdff Merge pull request #304 from stefanprodan/release-6.5.0
Release v6.5.0
2023-09-23 12:35:00 +03:00
Stefan Prodan
87e594b109 Release 6.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 12:29:59 +03:00
Stefan Prodan
7ec9e6c84a Merge pull request #303 from stefanprodan/publish-timoni-module
Publish signed Timoni module to GHCR
2023-09-23 12:22:06 +03:00
Stefan Prodan
8183d0d5fc Publish signed Timoni module to GHCR
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 12:16:48 +03:00
Stefan Prodan
aa27416651 Merge pull request #302 from stefanprodan/module-imps
Timoni module improvements
2023-09-23 11:35:47 +03:00
Stefan Prodan
b0594a85b9 Add e2e tests for Timoni module
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 11:29:47 +03:00
Stefan Prodan
e816d1b5bc Add UI configuration
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 10:04:56 +03:00
Stefan Prodan
6316e213d1 Improve monitoring config
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 09:25:25 +03:00
Stefan Prodan
a1b112f4e1 Mark vendored code
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 00:43:20 +03:00
Stefan Prodan
1495fd888e Merge pull request #301 from stefanprodan/timoni-module
Add Timoni module
2023-09-23 00:37:48 +03:00
Stefan Prodan
dfc4a6d37e Add Timoni module
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-23 00:33:36 +03:00
Stefan Prodan
aaa47e535f Merge pull request #300 from stefanprodan/up-deps
Update dependencies
2023-09-22 23:29:36 +03:00
Stefan Prodan
0278e11a05 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-09-22 23:24:32 +03:00
Stefan Prodan
12ceae475f Merge pull request #284 from johankok/add-additional-labels-to-ingress
Added additionalLabels option for ingress in helm chart
2023-09-22 23:13:11 +03:00
Stefan Prodan
4892983fd1 Merge pull request #290 from stefanprodan/release-6.4.1
Release v6.4.1
2023-08-10 15:25:19 +03:00
Stefan Prodan
bcf492e92b Release v6.4.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-10 15:10:01 +03:00
Stefan Prodan
a54550e439 Merge pull request #289 from stefanprodan/go-1.21
Build with Go 1.21
2023-08-10 15:08:37 +03:00
Stefan Prodan
29dd482f49 Build with Go 1.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-10 15:04:03 +03:00
Stefan Prodan
3a7d4d1544 Merge pull request #285 from stefanprodan/up-deps
Update dependencies
2023-08-10 14:59:18 +03:00
Stefan Prodan
c14b116dea Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-07 16:20:42 +03:00
Johan Kok
12c078938d Added additionalLabels option for ingress 2023-07-17 17:50:42 +02:00
Stefan Prodan
dd3869b1a1 Merge pull request #274 from stefanprodan/alpine-3.18
Update base image to Alpine 3.18
2023-06-26 13:02:18 +03:00
Stefan Prodan
45cfe3abc2 Update base image to Alpine 3.18
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 12:57:54 +03:00
Stefan Prodan
fcf573111b Merge pull request #273 from stefanprodan/release-6.4.0
Release 6.4.0
2023-06-26 12:55:42 +03:00
Stefan Prodan
cadabcc6a5 Release 6.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 12:50:40 +03:00
Stefan Prodan
9dfb676083 Sign release tags with OpenPGP
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 12:49:33 +03:00
Stefan Prodan
e06a5517da Merge pull request #272 from stefanprodan/deps-up
Update dependencies
2023-06-22 18:51:41 +03:00
Stefan Prodan
fedab0de38 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-22 18:36:47 +03:00
Stefan Prodan
7d13025a35 Merge pull request #271 from jjchambl/feature/add_dynamic_paths
feat(echo): add dynamic path support for echo endpoint
2023-06-22 18:30:00 +03:00
Jacob Chambliss
7280e43cbf chore: add pathprefix to enable dynamic paths for echo 2023-06-08 10:14:21 -05:00
Jacob Chambliss
3ef0b4cd09 feat: add dynamic path support for echo endpoint 2023-06-07 16:55:25 -05:00
Stefan Prodan
073f1ec5af Merge pull request #265 from stefanprodan/release-6.3.6
Release 6.3.6
2023-05-03 17:26:29 +03:00
Stefan Prodan
1e0307c759 Release 6.3.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-03 17:22:28 +03:00
Stefan Prodan
d4d75c2fbf Merge pull request #264 from stefanprodan/update-otel
Update dependencies
2023-05-03 17:10:32 +03:00
Stefan Prodan
2a6533c68a Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-03 17:00:48 +03:00
Stefan Prodan
0647aea75b Merge pull request #263 from mstiri/feature/add-startup-probe
chart: Add optional startupProbe values
2023-04-22 14:37:35 +02:00
Mossaab Stiri
8c258bb1d8 Add startupProbe for deployment and use a flag to enable/disable it 2023-04-18 13:20:47 +02:00
Stefan Prodan
58726f0bd2 Merge pull request #262 from stefanprodan/update-deps
Update dependencies
2023-04-06 11:21:52 +03:00
Stefan Prodan
bc08542ed3 Generate CUE go.mod in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-04-06 11:18:03 +03:00
Stefan Prodan
bbce3f3f67 Update dependencies
- github.com/spf13/cobra v1.7.0
- github.com/swaggo/http-swagger v1.3.4
- github.com/swaggo/swag v1.8.12
- google.golang.org/grpc v1.54.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-04-06 10:35:43 +03:00
Stefan Prodan
67e2c98a60 Merge pull request #260 from stefanprodan/cosign-update
Update sigstore/cosign-installer to v3
2023-03-09 11:07:16 +02:00
Stefan Prodan
938b00be6d Update sigstore/cosign-installer to v3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-09 11:01:32 +02:00
Stefan Prodan
e6c7657155 Merge pull request #259 from stefanprodan/release-6.3.5
Release 6.3.5
2023-03-09 10:47:40 +02:00
Stefan Prodan
d75e8d7838 Release 6.3.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-09 10:42:52 +02:00
Stefan Prodan
74d6532429 Merge pull request #258 from stefanprodan/otel-updates
Update open telemetry dependencies
2023-03-09 10:41:49 +02:00
Stefan Prodan
8187f79475 Update open telemetry dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-09 10:37:39 +02:00
Stefan Prodan
2b6f4f0a7d Merge pull request #257 from hiddeco/update-autoscaling-apis
Update `autoscaling/v2beta2` to `autoscaling/v2`
2023-03-09 10:30:04 +02:00
Hidde Beydals
3a4a99697b Update autoscaling/v2beta2 to autoscaling/v2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 09:23:00 +01:00
Stefan Prodan
1abc44f0d8 Merge pull request #254 from stefanprodan/release-6.3.4
Release v6.3.4
2023-02-21 10:49:33 +02:00
Stefan Prodan
3d798af827 Release v6.3.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-21 10:44:37 +02:00
Stefan Prodan
f8f8073946 Merge pull request #253 from stefanprodan/update-deps-xnet
Update dependencies
2023-02-21 10:41:42 +02:00
Stefan Prodan
c8c7a6d1bb Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-21 10:37:19 +02:00
Stefan Prodan
eac008b339 Merge pull request #249 from exfly/be-fix-stress-typo
Fix beginStressTest memory log typo
2023-02-05 13:45:00 +02:00
exfly
d2227a4204 Fix beginStressTest memory log typo 2023-02-05 13:03:04 +08:00
Stefan Prodan
ae3fe3da98 Merge pull request #247 from stefanprodan/release-6.3.3
Release v6.3.3
2023-02-03 13:08:33 +02:00
Stefan Prodan
42fdaf8e7a Release v6.3.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 13:01:30 +02:00
Stefan Prodan
3e2d907993 Merge pull request #246 from stefanprodan/go-1.20
build: Update Go to 1.20
2023-02-03 12:57:39 +02:00
Stefan Prodan
21136b6405 build: Update Go to 1.20
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 12:45:46 +02:00
Stefan Prodan
e8c388a3fd Merge pull request #245 from stefanprodan/release-6.3.2
Release v6.3.3
2023-02-03 12:28:34 +02:00
Stefan Prodan
abc38e1bff Release v6.3.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 12:25:11 +02:00
Stefan Prodan
bf4a3140fe Merge pull request #244 from stefanprodan/slsa-sbom
build: Enable SBOM and SLSA Provenance
2023-02-03 12:23:00 +02:00
Stefan Prodan
de2dd687cb build: Enable SBOM and SLSA Provenance
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 12:19:26 +02:00
Stefan Prodan
f7a9563986 Merge pull request #243 from stefanprodan/release-6.3.1
Release v6.3.1
2023-02-03 11:52:05 +02:00
Stefan Prodan
a699fffe7b Release v6.3.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 11:47:55 +02:00
Stefan Prodan
24e5de8934 Merge pull request #242 from stefanprodan/golang-jwt
Update dependencies
2023-02-03 11:46:53 +02:00
Stefan Prodan
298c1ae941 Update dependencies
- Replace `dgrijalva/jwt-go` with `golang-jwt/jwt`
- Replace `ioutil` with `io` and `os`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-03 11:42:17 +02:00
Stefan Prodan
fdd0a0b7da Merge pull request #240 from stefanprodan/kubeconform
Validate manifests with kubeconform
2022-12-23 13:28:18 +02:00
Stefan Prodan
8bab17843c Validate manifests with kubeconform
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-23 13:23:24 +02:00
Stefan Prodan
34c5ab57b6 Merge pull request #239 from stefanprodan/cue-hpa-v2
Update HPA to v2 in CUE definitions
2022-12-23 12:30:23 +02:00
Stefan Prodan
0f9c989b68 Update HPA to v2 in CUE definitions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-23 12:18:50 +02:00
Stefan Prodan
e2e85a9604 Merge pull request #238 from stefanprodan/release-v6.3.0
Release v6.3.0
2022-12-21 12:58:20 +02:00
Stefan Prodan
b687d3c76f Update Alpine to v3.17
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 12:53:43 +02:00
Stefan Prodan
dbbb415194 Release v6.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 12:50:25 +02:00
Stefan Prodan
1a89d81ebb Merge pull request #237 from stefanprodan/hpa-v2
Update HPA to autoscaling/v2
2022-12-21 12:43:55 +02:00
Stefan Prodan
b39526ebe8 Set Kubernetes 1.23.0 as the minimum required version
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 12:33:47 +02:00
Stefan Prodan
607303dca9 Update HPA to autoscaling/v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 12:07:31 +02:00
Stefan Prodan
3053e634f9 Merge pull request #236 from stefanprodan/update-workflows
Update GitHub workflows
2022-12-21 12:00:59 +02:00
Stefan Prodan
4f1e56ae83 Update GitHub workflows
- replace `engineerd/setup-kind` with `helm/kind-action`
- use  `azure/setup-helm` to install the Helm CLI

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 11:55:36 +02:00
Stefan Prodan
f0590a03e0 Merge pull request #235 from stefanprodan/update-x/net
Update dependencies
2022-12-21 11:23:32 +02:00
Stefan Prodan
aa815625d9 Update dependencies
Fix for golang.org/x/net CVEs

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 11:18:30 +02:00
Stefan Prodan
8615cb75d9 Merge pull request #233 from stefanprodan/release-6.2.3
Release v6.2.3
2022-11-09 13:17:16 +02:00
Stefan Prodan
b23ebb15cb Release v6.2.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-09 13:12:30 +02:00
Stefan Prodan
dcb5b13023 Merge pull request #232 from stefanprodan/deps-update
Update dependencies
2022-11-09 13:10:23 +02:00
Stefan Prodan
71869089fa Update dependencies
- github.com/prometheus/client_golang v1.14.0
- github.com/spf13/cobra v1.6.1
- github.com/spf13/viper v1.14.0
- go.opentelemetry.io/contrib/propagators/ot v1.11.1
- golang.org/x/net v0.2.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-09 12:59:22 +02:00
Stefan Prodan
1cf228c67b Merge pull request #228 from stefanprodan/release-6.2.2
Release 6.2.2
2022-10-20 12:25:15 +03:00
Stefan Prodan
b6e81a931b Release 6.2.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-20 12:12:44 +03:00
Stefan Prodan
744597a481 Merge pull request #227 from stefanprodan/deps-up
Update dependencies
2022-10-20 12:05:40 +03:00
Stefan Prodan
389c86ee93 Update dependencies
Fix CVE-2022-32149 of `golang.org/x/text`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-20 12:00:33 +03:00
Stefan Prodan
34db5fa463 Merge pull request #226 from cv65kr/feat/graceful-shutdown
Enable graceful shutdown for gRPC server
2022-10-20 11:48:43 +03:00
Kajetan
0d62402ae9 Graceful shutdown 2022-10-18 17:31:51 +02:00
Stefan Prodan
e40d32ba87 Merge pull request #224 from jkremser/helm-probes
Add a way to customize liveness and readiness probes in helm chart
2022-10-06 15:17:54 +02:00
Jirka Kremser
3879b59f43 Add a way to customize liveness and readiness probes in helm chart
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
2022-10-03 17:36:14 +02:00
Stefan Prodan
44157ecd84 Merge pull request #222 from stefanprodan/release-6.2.1
Release 6.2.1
2022-09-29 12:54:45 +03:00
Stefan Prodan
bfa8d8032f Release 6.2.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 12:49:43 +03:00
Stefan Prodan
b1251214f6 Merge pull request #221 from stefanprodan/update-golang.org/x/net
Update dependencies
2022-09-29 12:41:38 +03:00
Stefan Prodan
f1168c4946 Update dependencies
Fix for golang.org/x/net CVE-2022-27664

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 12:36:35 +03:00
Stefan Prodan
013343a232 Merge pull request #220 from stefanprodan/go1.19
Build with Go 1.19
2022-09-29 12:31:39 +03:00
Stefan Prodan
d460863f3b Merge pull request #217 from Boojapho/imagepullsecret
feat(helm): added imagepullsecrets
2022-09-29 12:31:26 +03:00
Stefan Prodan
25a1e26159 Build with Go 1.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 12:24:20 +03:00
Stefan Prodan
b39afea117 Merge pull request #219 from stefanprodan/build-revision
ci: Add revision to Docker build args
2022-09-29 12:23:27 +03:00
Stefan Prodan
6d11ef9baf ci: Add revision to Docker build args
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 12:18:53 +03:00
Michael McLeroy
baf128d856 feat(helm): added imagepullsecrets 2022-09-13 15:55:16 -04:00
Stefan Prodan
79f8138328 Merge pull request #215 from stefanprodan/fix-flux-oci
Fix Flux tagging action
2022-08-15 15:48:06 +03:00
Stefan Prodan
ceed4e7870 Fix Flux tagging action
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-15 15:43:33 +03:00
Stefan Prodan
bfce2199e8 Merge pull request #214 from stefanprodan/release-6.2.0
Release 6.2.0
2022-08-15 15:36:39 +03:00
Stefan Prodan
d55bb8eabd Release 6.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-15 15:29:44 +03:00
Stefan Prodan
5fb056ebcb Merge pull request #213 from stefanprodan/update-actions
Update GitHub Actions workflows
2022-08-15 15:28:53 +03:00
Stefan Prodan
35b9c9f946 Update GitHub Actions workflows
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-15 15:22:02 +03:00
Stefan Prodan
74e0aeeff7 Merge pull request #212 from stefanprodan/update-deps
Update dependencies
2022-08-15 15:10:54 +03:00
Stefan Prodan
bbb081b0e1 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-15 15:06:41 +03:00
Stefan Prodan
c16318bb85 Merge pull request #211 from stefanprodan/flux-oci
Publish OCI artifacts on release with Flux
2022-08-15 15:01:51 +03:00
Stefan Prodan
86d5fe86e4 Publish OCI artifacts on release with Flux
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-15 14:56:50 +03:00
Stefan Prodan
b3b00fe354 Merge pull request #209 from stefanprodan/release-6.1.8
Release 6.1.8
2022-07-28 13:13:30 +03:00
Stefan Prodan
a7bcfaf9b3 Release 6.1.8
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-28 13:06:55 +03:00
Stefan Prodan
1d4c534728 Merge pull request #208 from stefanprodan/update-go-yaml
Update gopkg.in/yaml.v3 to v3.0.1
2022-07-28 13:05:52 +03:00
Stefan Prodan
f2e0aa154d Update gopkg.in/yaml.v3 to v3.0.1
Fix CVE-2022-28948

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-28 12:59:12 +03:00
Stefan Prodan
6d5b3d254a Merge pull request #207 from stefanprodan/release-6.1.7
Release 6.1.7
2022-07-27 19:19:21 +03:00
Stefan Prodan
9b9f11da95 Release 6.1.7
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-27 19:11:48 +03:00
Stefan Prodan
1a55e30bcf Merge pull request #206 from stefanprodan/update-swagger
Update Swagger packages and definition
2022-07-27 19:10:11 +03:00
Stefan Prodan
394c40e3ff Update Swagger packages and definition
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-27 18:59:22 +03:00
Stefan Prodan
b76b1a38c9 Merge pull request #204 from FlomoN/master
Add path based params to OpenAPI spec
2022-06-22 11:11:40 +03:00
FlomoN
2eb17d80c8 add some more params to other api routes with path based params 2022-06-20 18:37:13 +02:00
FlomoN
678a42ce34 recreate docs 2022-06-20 18:26:34 +02:00
FlomoN
2da59980fe switch to for installing swag 2022-06-20 18:05:53 +02:00
FlomoN
8697f091f3 Add params to godoc for cache 2022-06-20 14:20:34 +02:00
Stefan Prodan
4d2cf65260 Merge pull request #202 from TaylorMonacelli/patch-1
Fix test error "Error: release: not found"
2022-06-14 11:58:54 +03:00
Taylor Monacelli
116a378991 Fix test error "Error: release: not found" 2022-06-12 12:05:41 -07:00
Stefan Prodan
450796ddb2 Merge pull request #200 from stefanprodan/release-6.1.6
Release v6.1.6
2022-05-31 13:11:27 +03:00
Stefan Prodan
cb8c1fcec1 Release v6.1.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-31 13:04:28 +03:00
Stefan Prodan
37da8d1c74 Merge pull request #199 from stefanprodan/update-deps
Update dependencies
2022-05-31 13:01:10 +03:00
Stefan Prodan
e55ebd258d Update dependencies
Fix CVE-2022-28948

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-31 12:42:25 +03:00
Stefan Prodan
6b869d1a18 Merge pull request #198 from stefanprodan/go-1.18
Update Go to 1.18 and Alpine to 3.16
2022-05-24 13:06:50 +03:00
Stefan Prodan
dea973d614 Release podinfo 6.1.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-24 12:09:58 +03:00
Stefan Prodan
f4199ab8bc Update Go to 1.18 and Alpine to 3.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-24 12:09:08 +03:00
Paul Carlton
19603ddfc1 Fix panic triggering via HTTP API (#197)
Fix GET /panic

The GET /panic api call is not working due the the logger.Panic method
failing to call panic. This change replaces the logger.Panic method
call with logger.Info and adds a call to os.Exit(255).
2022-05-24 12:03:54 +03:00
Stefan Prodan
bf09377bfd Merge pull request #194 from stefanprodan/release-v6.1.4
Release v6.1.4
2022-04-18 10:00:06 +03:00
Stefan Prodan
075712dd73 Release v6.1.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-18 09:56:02 +03:00
Stefan Prodan
07dd9a3c3e Merge pull request #193 from stefanprodan/deps-up
Update dependencies
2022-04-18 09:54:32 +03:00
Stefan Prodan
63ac69ea69 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-18 09:49:42 +03:00
Stefan Prodan
3db382d2c9 Merge pull request #192 from stefanprodan/cue-refac
Refactor CUE module
2022-04-18 09:44:21 +03:00
Stefan Prodan
9f88a0e940 Refactor CUE module
- set default labels and annotations
- fix the service monitor selector
- allow setting ingress annotations
- remove embedded cert
- add cert-manager example for ingress
- set CPU scaling as default in HPA
- rename app input to config
- rename app out to objects

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-17 15:43:09 +03:00
Stefan Prodan
c6a2c90497 Merge pull request #191 from stefanprodan/exclude-cue-vendor
Exclude the CUE vendor packages from Git
2022-04-14 19:31:59 +03:00
Stefan Prodan
54908f7d51 Exclude the CUE vendor packages from Git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-14 19:03:58 +03:00
Stefan Prodan
36bf90b008 Merge pull request #190 from stefanprodan/release-6.1.3
Release v6.1.3
2022-04-13 11:52:28 +03:00
Stefan Prodan
dd9020c8b2 Release v6.1.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-13 11:43:55 +03:00
Stefan Prodan
51009591a5 Merge pull request #189 from stefanprodan/redis-url-fix
Add protocol to Redis URL
2022-04-13 11:42:55 +03:00
Stefan Prodan
2b8c71ba78 Add protocol to Redis URL
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-13 11:37:49 +03:00
Stefan Prodan
203f7e1bf0 Merge pull request #187 from stefanprodan/release-6.1.2
Release 6.1.2
2022-04-11 16:35:21 +03:00
Stefan Prodan
8179263f52 Release 6.1.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-11 16:30:15 +03:00
Stefan Prodan
b26a34b5b6 cue: Fix label selectors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-11 16:29:35 +03:00
Stefan Prodan
cd7a0fb18e Rename cue module
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-11 15:45:12 +03:00
Stefan Prodan
c1fd17e50a Merge pull request #185 from phoban01/piarash/cue-module
Add CUE module for generating Kubernetes manifests
2022-04-11 15:38:29 +03:00
Piaras Hoban
f98267009e cue: move cue fmt check above dirty working tree check in test workflow
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 11:56:59 +01:00
Piaras Hoban
7d0203196a cue: add cue format and validation checks to github actions test workflow
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 11:03:22 +01:00
Piaras Hoban
673966bae4 cue: remove linkerd ServiceProfile resource
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 10:44:35 +01:00
Piaras Hoban
9265828c4f cue: patch version in main.cue with makefile version-set rule
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 10:44:01 +01:00
Piaras Hoban
0f68b60870 cue: remove default tag from config.image
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 10:27:14 +01:00
Piaras Hoban
217a27ce02 cue: rename directory from cuelang -> cue
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-11 10:26:00 +01:00
Piaras Hoban
fc172b0e7c add cuelang module for podinfo
Signed-off-by: Piaras Hoban <phoban01@gmail.com>
2022-04-06 17:50:41 +01:00
Stefan Prodan
b891025365 Fix Helm OCI packaging job
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-30 11:38:41 +03:00
Stefan Prodan
3c3f2a2e60 Merge pull request #183 from stefanprodan/release-6.1.1
Release v6.1.1
2022-03-30 11:24:21 +03:00
Stefan Prodan
06b5e969db Publish v6.1.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-30 11:17:38 +03:00
Stefan Prodan
8508550ee6 Merge pull request #182 from stefanprodan/helm-oci
Published signed Helm charts to GHCR
2022-03-30 11:16:19 +03:00
Stefan Prodan
5c1032c578 Published signed Helm charts to GHCR
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-30 11:11:45 +03:00
Stefan Prodan
9febc66b98 Merge pull request #180 from mmontes11/redis-basic-auth
Adapted cache to support redis authentication
2022-03-29 10:26:13 +03:00
Stefan Prodan
59dc738b25 Merge pull request #181 from nozaq/fix-typo
Fix a typo
2022-03-29 10:25:56 +03:00
nozaq
8524be7240 Fix a typo 2022-03-27 21:44:09 +09:00
Martín Montes
065a18c258 Adapted cache to support redis authentication 2022-03-23 22:13:14 +01:00
Stefan Prodan
79279ccb31 Merge pull request #178 from stefanprodan/release-6.1.0
Release 6.1.0
2022-03-12 13:29:52 +02:00
Stefan Prodan
7e1ef7457e Release 6.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-12 13:25:23 +02:00
Stefan Prodan
af4919172a Merge pull request #177 from stefanprodan/cosign
Sign container images with cosign and GitHub OIDC
2022-03-12 13:24:26 +02:00
Stefan Prodan
532e8f85b5 Merge pull request #167 from utkuozdemir/patch-1
Fix ingress URL in Helm chart NOTES.txt
2022-03-12 13:24:13 +02:00
Stefan Prodan
7c90501b8b Sign container images with cosign and GitHub OIDC
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-12 13:15:09 +02:00
Stefan Prodan
5f1fb66f6f Merge pull request #176 from stefanprodan/disable-otel
Disable tracing by default
2022-03-12 13:04:59 +02:00
Stefan Prodan
be80733cea Disable tracing by default
To enable OTEL tracing, the `--otel-service-name` flag must be set.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-12 12:58:39 +02:00
Stefan Prodan
8572a390f7 Merge pull request #170 from rajatvig/otel
Add support for OpenTelemetry to podinfo http API
2022-03-12 12:05:16 +02:00
Stefan Prodan
b2a41c64de Update Trivy vulnerability scanner
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-09 15:38:51 +02:00
Stefan Prodan
11cf36d838 Merge pull request #175 from stefanprodan/go-1.17
Update Go to v1.17
2022-03-09 15:21:47 +02:00
Stefan Prodan
5d440e41da Release 6.0.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-09 15:16:34 +02:00
Stefan Prodan
170b912d25 Update Go to v1.17
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-09 15:06:55 +02:00
Rajat Vig
38a7952407 Reformat 2022-01-10 16:19:45 +00:00
Rajat Vig
de90d92697 Remove default to insecure GRPC 2022-01-02 00:19:18 +00:00
Rajat Vig
22ee79fcb8 Add the copyheaders code back 2021-12-22 14:13:36 +00:00
Rajat Vig
03ffc8bc34 Create a new otel directory; Add a readme and makefile 2021-12-22 12:15:56 +00:00
Rajat Vig
c4f2a6c5e6 Setup different name; Copying of headers is not required for spans 2021-12-22 01:29:21 +00:00
Rajat Vig
ab9f7410c2 Get a docker-compose for example; Port code to otel-grpc 2021-12-22 01:09:49 +00:00
Rajat Vig
2c85a72737 Add back copyTraceHeaders() as OpenTelemetry does not default propagate 2021-12-16 14:12:32 +00:00
Rajat Vig
3970a3a323 Add noop tracer to the mockServer; migrate to go 1.17 2021-12-16 13:37:01 +00:00
Ilya Dmitrichenko
61d6ed42f5 Add OpenTelemetry tracer 2021-12-16 12:39:10 +00:00
Utku Özdemir
bb11285c6f Fix ingress URL in Helm chart NOTES.txt
Fixes the notes that are printed when the Helm chart is installed with `ingress.enabled: true`.

Before:
```
1. Get the application URL by running these commands:
  https://map[host:podinfo.example.com paths:[map[path:/ pathType:ImplementationSpecific]]]
```

After the change:
```
1. Get the application URL by running these commands:
  https://podinfo.example.com/
```

The changed part is taken as-is from the output of the `helm create` command of Helm version 3.7.1.
Tested & working as expected.
2021-11-30 15:32:01 +01:00
Stefan Prodan
132f4e7192 Merge pull request #165 from cv65kr/cv65kr-patch-1
Remove duplicated endpoint
2021-11-14 16:12:13 +02:00
Kajetan
6c596bf19b Remove duplicated endpoint 2021-11-14 14:36:09 +01:00
Stefan Prodan
ea292aa958 Merge pull request #160 from stefanprodan/release-6.0.3
Release v6.0.3
2021-10-21 17:50:42 +03:00
Stefan Prodan
33fa856b63 Release v6.0.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-21 17:45:33 +03:00
Stefan Prodan
6065c5aa79 Merge pull request #159 from stefanprodan/tonistiigi/xx
Use tonistiigi/xx for multi-arch builds
2021-10-21 17:44:21 +03:00
Stefan Prodan
0771a597e6 Use tonistiigi/xx for multi-arch builds
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-21 17:35:43 +03:00
Stefan Prodan
693ffa9d28 Merge pull request #158 from stefanprodan/release-6.0.2
Release v6.0.2
2021-10-21 16:40:23 +03:00
Stefan Prodan
1c39c04ac9 Release v6.0.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-21 16:35:25 +03:00
Stefan Prodan
a27ef20cb7 Merge pull request #157 from stefanprodan/pub-config-to-ghcr
Publish the deploy manifests to GHCR
2021-10-21 16:31:26 +03:00
Stefan Prodan
5e2089eafb Publish the deploy manifests to GHCR
- bundle the kustomize overlay as an OCI artifact
- push the artifact to `ghcr.io/stefanprodan/podinfo-config` with crane
- sign the artifact with cosign

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-21 16:26:10 +03:00
Stefan Prodan
68fd4e245a Merge pull request #156 from stefanprodan/release-6.0.1
Release v6.0.1
2021-10-20 13:19:47 +03:00
Stefan Prodan
b718809f3b Release v6.0.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-20 13:14:39 +03:00
Stefan Prodan
26379a5589 Merge pull request #155 from stefanprodan/update-deps
Update dependencies
2021-10-20 13:12:55 +03:00
Stefan Prodan
8d37bcfa32 Update cert-manager to v1.5.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-20 11:28:30 +03:00
Stefan Prodan
f168e1909b Update dependencies
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
go.uber.org/zap v1.19.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-20 11:03:43 +03:00
Stefan Prodan
627d5c4bb6 Merge pull request #140 from stefanprodan/release-6.0.0
Release v6.0.0
2021-06-16 15:30:23 +03:00
Stefan Prodan
29f3e7f430 Release v6.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-16 15:24:35 +03:00
Stefan Prodan
8a7d5689e5 Merge pull request #139 from stefanprodan/alpine-3.14
Update Alpine to v3.14
2021-06-16 15:21:02 +03:00
Stefan Prodan
70ab46cd6e Update Alpine to v3.14
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-16 15:16:43 +03:00
Stefan Prodan
d8effad747 Merge pull request #138 from stefanprodan/deps-update
Update dependencies
2021-06-16 14:54:25 +03:00
Stefan Prodan
dc97765557 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-16 14:37:41 +03:00
Stefan Prodan
685371108d Merge pull request #136 from monotek/ingressClassName
chart: Upgrade Ingress to networking.k8s.io/v1 and add ingressClassName
2021-06-08 19:08:16 +03:00
André Bauer
b6f1555176 added ingressClassName
Signed-off-by: André Bauer <monotek23@gmail.com>
2021-06-04 15:51:59 +02:00
Stefan Prodan
deadf87be8 Merge pull request #134 from stefanprodan/release-v5.2.1
Release v5.2.1
2021-05-13 15:33:46 +03:00
Stefan Prodan
1d75661e45 Release v5.2.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-13 15:33:21 +03:00
Stefan Prodan
6a78560d28 Update dgrijalva/jwt-go to v4 (#133)
Fix for CVE-2020-26160 https://avd.aquasec.com/nvd/cve-2020-26160/

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-13 15:30:43 +03:00
Hendrik Ferber
9c4df129c6 added additional labels to servicemonitor template (#132)
chart: Add additional labels to servicemonitor template

Co-authored-by: Hendrik Ferber <HFerber@anexia-it.com>
2021-05-06 16:39:41 +03:00
Stefan Prodan
21c8dfbb69 Merge pull request #130 from onematchfox/master
Add option to bind service to specific host
2021-04-21 14:45:36 +03:00
Brian Fox
8c93f05fa9 feat: add option to bind service to specific host 2021-04-16 08:07:56 +02:00
Stefan Prodan
ef98a040c8 Merge pull request #129 from stefanprodan/release-v5.2.0
Release v5.2.0
2021-03-22 11:45:01 +02:00
Stefan Prodan
bcd8e65416 Release v5.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-22 11:40:18 +02:00
Stefan Prodan
79ab71bcf9 Merge pull request #128 from stefanprodan/cd-docs
Add Continuous Delivery section to readme
2021-03-21 20:31:49 +02:00
Stefan Prodan
a67c482a87 Add Continuous Delivery section to readme
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 19:27:27 +02:00
Stefan Prodan
7d89cbfd07 Merge pull request #127 from stefanprodan/chart-improvements
Helm chart improvements
2021-03-21 18:09:39 +02:00
Stefan Prodan
0b73f44190 chart: Add container security context
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 15:58:29 +02:00
Stefan Prodan
5751990e1a chart: Rearrange values
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 15:35:32 +02:00
Stefan Prodan
6d1d8c1271 chart: Add service annotations
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 15:21:37 +02:00
Stefan Prodan
81a311281e Merge pull request #126 from stefanprodan/helm-action
Refactor Helm GitHub Action
2021-03-21 14:51:32 +02:00
Stefan Prodan
71647cee9a Refactor Helm GitHub Action
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 13:49:32 +02:00
Stefan Prodan
2487019631 Merge pull request #125 from stefanprodan/go-1.16
Update Go to v1.16
2021-03-21 13:42:36 +02:00
Stefan Prodan
885a35eebf Update Go to v1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-21 13:37:26 +02:00
Stefan Prodan
d36c523e67 Merge pull request #124 from runyontr/redis-connection-fix
chart: Fix Redis backend url
2021-03-05 16:45:20 +02:00
Thomas Runyon
43b05fb948 Update redis backend url
The connection information for redis does not match the service entry.
2021-03-05 08:56:23 -05:00
Stefan Prodan
6856337c57 Merge pull request #123 from mhulscher/servicemonitor-should-select-own-namespace-only
fix(chart): ensure that the servicemonitor only selects its own namespace
2021-03-01 16:51:08 +02:00
Mitch Hulscher
2b603bedcd fix(chart): ensure that the servicemonitor only selects its own namespace 2021-03-01 14:59:19 +01:00
Stefan Prodan
e43ebfa5bf Merge pull request #121 from stefanprodan/release-5.1.4
Release v5.1.4
2021-02-02 16:26:20 +02:00
Stefan Prodan
c914acb34d Release v5.1.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-02 16:20:22 +02:00
Stefan Prodan
982713606e Merge pull request #120 from 181192/service-monitor-selector
chart: Fix ServiceMonitor matchLabels for service
2021-02-02 10:03:57 +02:00
181192
63c0d0afe5 Fix servicemonitor matchLabels for service
Signed-off-by: 181192 <k@kalli.no>
2021-02-01 18:47:54 +01:00
Stefan Prodan
4407939ea3 Merge pull request #119 from stefanprodan/release-5.1.3
Release v5.1.3
2021-01-31 12:41:08 +02:00
Stefan Prodan
ee6df13f57 Release v5.1.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-31 12:36:06 +02:00
Stefan Prodan
97f9aca039 Merge pull request #118 from stefanprodan/remove-helmv2-tests
Refactor e2e tests
2021-01-28 16:11:27 +02:00
Stefan Prodan
f30e3f89ed Refactor e2e tests
- remove Helm v2 and Tiller
- update Helm v3 to 3.5.0
- rename scripts dir to test

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-28 13:05:34 +02:00
Stefan Prodan
f220644263 Merge pull request #117 from a-vorobiev/fix/use-group
Fix adduser param to actually use 'app' group
2021-01-26 10:57:35 +02:00
Anton Vorobiev
9e066ebc7b Fix adduser param to actually use 'app' group 2021-01-23 21:58:49 +01:00
Stefan Prodan
855f7724be Merge pull request #113 from stefanprodan/release-5.1.2
Release v5.1.2
2020-12-14 13:22:23 +02:00
Stefan Prodan
33d1e950a9 Release v5.1.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-14 13:13:47 +02:00
Stefan Prodan
ec57c11356 Merge pull request #112 from ErezArbell/patch-1
Add quoting support in ingress to allow wildcard domain
2020-12-14 10:18:00 +02:00
ErezArbell
f0d7f0adca Add quoting support in ingress to allow wildcard domain
YAML requires asterisk to be quoted.  
If we want to use wildcard host in the ingress so we put in values.yaml something like
```
ingress:
  tls:
    - secretName: my-secret-tls
      hosts:
        - '*.example.com'
```
then Helm removes the quote mark before putting the hosts value in the ingress, so the ingress will have this unquoted and will give error:
```
Error: YAML parse error on podinfo/templates/ingress.yaml: error converting YAML to JSON: yaml: line 21: did not find expected alphabetic or numeric character
```

See same issue : <https://github.com/helm/helm/issues/3936>.
and this PR that fixes it in Helm code: <https://github.com/helm/helm/pull/3956>.

This fix applies the same to podinfo.
2020-12-14 09:44:50 +02:00
Stefan Prodan
9f4d31a8c4 Merge pull request #111 from stefanprodan/release-v5.1.1
Release v5.1.1
2020-12-09 11:11:53 +02:00
Stefan Prodan
95eafd32f9 Release v5.1.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-09 10:25:36 +02:00
Stefan Prodan
86dbbf7254 Merge pull request #109 from ut8ia/patch-1
Issue : silence on config file missing error
2020-12-08 18:05:26 +02:00
Stefan Prodan
b13ec2ddb4 Merge pull request #110 from stefanprodan/release-v5.1.0
Release v5.1.0
2020-12-08 17:43:37 +02:00
Stefan Prodan
0f7a876dae Release v5.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-08 17:36:23 +02:00
Eugene Anufriev
837ff33ee0 Issue : silence on config file missing error
Any information in case when config file not exist or path\filename configured incorrectly.
It is not clear now.
Propose: handle such situation and inform about that.
2020-12-02 17:46:56 +02:00
Stefan Prodan
4735f54368 Merge pull request #108 from dmccaffery/feat/secure-port-chart
feat(charts): add tls support to helm chart
2020-11-20 15:43:54 +02:00
Deavon M. McCaffery
35c9128bca fix(charts): fix default tls port in deployment 2020-11-19 15:41:06 +00:00
Deavon M. McCaffery
411bce81c0 build: update e2e tests to validate secure-port
* pull out script blocks into `hack` path
* update e2e workflow to use scripts in `hack`
* install cert manager and self-signed cluster issuer in e2e
* deploy podinfo with secure port and certificate enabled
* add `hack/e2e.sh` script, which can be used to execute the github
  workflow locally
2020-11-19 03:04:36 +00:00
Deavon M. McCaffery
1ac286c3b0 feat(charts): add tls support to helm chart
* add tls variable block to configure service and pod with secure-port
* add ability to create cert-manager certificate
* add support for host ports (both http and https)
* add helm test for tls port
* add example values for secure-port deployment
  - this assumes certificate manager is deployed to the cluster
2020-11-19 02:46:25 +00:00
Stefan Prodan
b496853d32 Merge pull request #106 from dmccaffery/feat/secure-port
feat(podinfo): add secure port for end-to-end tls
2020-11-18 15:16:19 +02:00
Deavon M. McCaffery
9ca49aa442 build: replace add-path with environment files 2020-11-18 12:44:58 +00:00
Deavon M. McCaffery
bc809cd763 docs(deploy): add script to test podinfo using kind 2020-11-17 23:04:55 +00:00
Deavon M. McCaffery
046ac8a4a5 docs(deploy): add kube manifests for secure-port example 2020-11-17 23:04:35 +00:00
Deavon M. McCaffery
c38f357872 feat(podinfo): add secure port for end-to-end tls
* add `secure-port` argument to podinfo
* add `cert-path` argument to podinfo
* add http server for secure port
* normalise http/https server start
2020-11-17 23:01:41 +00:00
Stefan Prodan
95be17be1d Merge pull request #103 from stefanprodan/release-v5.0.3
Release v5.0.3
2020-10-28 11:50:48 +02:00
Stefan Prodan
5c30dfefc7 Release v5.0.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 11:43:11 +02:00
Stefan Prodan
d1829ea9ec Merge pull request #102 from stefanprodan/clean-up
Update modules and swagger docs
2020-10-28 11:41:02 +02:00
Stefan Prodan
06f2276501 Update packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 11:24:52 +02:00
Stefan Prodan
13f7ec7ba1 Update swagger docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 11:22:26 +02:00
Stefan Prodan
e9d5f7965f Remove deprecated CLI code cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 10:59:50 +02:00
Stefan Prodan
6596ed08de Merge pull request #101 from stefanprodan/release-5.0.2
Release v5.0.2
2020-10-06 09:59:15 +03:00
stefanprodan
4c0dfaef0e Release v5.0.2 2020-10-06 09:51:18 +03:00
Stefan Prodan
36e5ceaee2 Merge pull request #100 from hiddeco/chart/introduce-prod-values
chart: introduce prod values values
2020-10-06 00:53:10 +03:00
Hidde Beydals
5281c2d9a8 chart: introduce prod values 2020-10-05 23:39:16 +02:00
Stefan Prodan
7411da595c Merge pull request #99 from stefanprodan/release-v5.0.1
Release v5.0.1
2020-09-21 10:48:25 +03:00
stefanprodan
44f8ae96eb Release v5.0.1 2020-09-21 09:57:49 +03:00
Stefan Prodan
0cab9bf6b2 Merge pull request #98 from stefanprodan/arm-v6
Drop support for linux/arm/v6
2020-09-21 09:35:01 +03:00
stefanprodan
7111121165 Drop support for linux/arm/v6 2020-09-21 09:21:55 +03:00
stefanprodan
9299a2d1f3 Push semver to GHCR 2020-09-20 15:10:57 +03:00
Stefan Prodan
8d90770909 Merge pull request #97 from stefanprodan/release-v5.0.0
Release v5.0.0
2020-09-20 14:37:24 +03:00
stefanprodan
16a9f6f84c Release v5.0.0
Set the default container registry to GHCR
2020-09-20 14:32:05 +03:00
Stefan Prodan
6f4447fb8b Merge pull request #96 from stefanprodan/apache-license
Change license from MIT to Apache v2
2020-09-20 14:18:59 +03:00
stefanprodan
70e31587bb Change license from MIT to Apache v2 2020-09-20 14:08:41 +03:00
Stefan Prodan
6dca3b2743 Merge pull request #95 from stefanprodan/go-1.15
Update Go to v1.15
2020-09-20 13:50:01 +03:00
stefanprodan
5cd072243d Update Go to v1.15 2020-09-20 13:36:57 +03:00
Stefan Prodan
fbf20b8ac1 Merge pull request #94 from stefanprodan/ghcr
Publish multi-arch image to GHCR
2020-09-20 13:33:11 +03:00
stefanprodan
5833d41e85 Publish multi-arch image to GHCR 2020-09-20 13:27:05 +03:00
Stefan Prodan
a77b43479a Merge pull request #93 from hiddeco/patch-1
Always quote the UI color
2020-09-19 15:41:04 +03:00
Stefan Prodan
3b884b02c9 Merge pull request #92 from monotek/labels
updated chart labels to new helm standard
2020-09-19 15:40:46 +03:00
Hidde Beydals
1a56086320 Always quote the UI color
As otherwise the value will render to `null` for the default chart value due to the `#`.
2020-09-17 15:08:13 +02:00
André Bauer
692df9e5b7 changed selector label and added new labels to tests too
Signed-off-by: André Bauer <monotek23@gmail.com>
2020-09-11 14:07:47 +02:00
André Bauer
103929b14a updated chart labels to new helm standard
Signed-off-by: André Bauer <monotek23@gmail.com>
2020-09-11 12:23:24 +02:00
Stefan Prodan
d3865f9247 Merge pull request #91 from dirien/master
Update HPA to autoscaling/v2beta2
2020-08-06 10:02:06 +03:00
Engin Diri
3507958932 uodate autoscaling/v2beta1 to autoscaling/v2beta2 2020-08-05 21:01:09 +02:00
dirien
a8b8bad0e4 Update hpa.yaml
update apiVersion: autoscaling/v2beta2
2020-08-05 12:10:36 +02:00
Stefan Prodan
26a630c0b4 Merge pull request #89 from stefanprodan/release-4.0.6
Release v4.0.6
2020-06-26 13:42:49 +03:00
stefanprodan
76c18c588f Release v4.0.6 2020-06-26 13:26:28 +03:00
Stefan Prodan
df5ece51ef Merge pull request #88 from commixon/random-delay-revamp
Revisit random-delay
2020-06-26 10:43:17 +03:00
Chris Loukas
f7d1c5639c Validate config parameters for random delay
- random-delay-max should not be less than random-delay-min
- random-delay-unit accepted values: s|ms
2020-06-25 20:06:03 +03:00
Chris Loukas
20a136a73c Revisit random-delay
If enabled it will still delay randomly between 0-5 seconds.

However, the functionality to fine grain this is added.
Both seconds and milliseconds are supported now. Moreover,
min/max values for random delay can be condigured through
pflag params
2020-06-25 11:41:21 +03:00
332 changed files with 36756 additions and 2020 deletions

61
.cosign/README.md Normal file
View File

@@ -0,0 +1,61 @@
# Podinfo signed releases
Podinfo release assets (container image, Helm chart, Flux artifact, Timoni module)
are published to GitHub Container Registry and are signed with
[Cosign v2](https://github.com/sigstore/cosign) keyless & GitHub Actions OIDC.
## Verify podinfo with cosign
Install the [cosign](https://github.com/sigstore/cosign) CLI:
```sh
brew install sigstore/tap/cosign
```
### Container image
Verify the podinfo container image hosted on GHCR:
```sh
cosign verify ghcr.io/stefanprodan/podinfo:6.5.0 \
--certificate-identity-regexp="^https://github.com/stefanprodan/podinfo.*$" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
```
Verify the podinfo container image hosted on Docker Hub:
```sh
cosign verify docker.io/stefanprodan/podinfo:6.5.0 \
--certificate-identity-regexp="^https://github.com/stefanprodan/podinfo.*$" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
```
### Helm chart
Verify the podinfo [Helm](https://helm.sh) chart hosted on GHCR:
```sh
cosign verify ghcr.io/stefanprodan/charts/podinfo:6.5.0 \
--certificate-identity-regexp="^https://github.com/stefanprodan/podinfo.*$" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
```
### Flux artifact
Verify the podinfo [Flux](https://fluxcd.io) artifact hosted on GHCR:
```sh
cosign verify ghcr.io/stefanprodan/manifests/podinfo:6.5.0 \
--certificate-identity-regexp="^https://github.com/stefanprodan/podinfo.*$" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
```
### Timoni module
Verify the podinfo [Timoni](https://timoni.sh) module hosted on GHCR:
```sh
cosign verify ghcr.io/stefanprodan/modules/podinfo:6.5.0 \
--certificate-identity-regexp="^https://github.com/stefanprodan/podinfo.*$" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
```

4
.cosign/cosign.pub Normal file
View File

@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEST+BqQ1XZhhVYx0YWQjdUJYIG5Lt
iz2+UxRIqmKBqNmce2T+l45qyqOs99qfD7gLNGmkVZ4vtJ9bM7FxChFczg==
-----END PUBLIC KEY-----

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
timoni/podinfo/cue.mod/** linguist-vendored

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: stefanprodan

View File

@@ -1,6 +0,0 @@
FROM stefanprodan/alpine-base:latest
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,15 +0,0 @@
name: 'helm'
description: 'A GitHub Action to run helm commands'
author: 'Stefan Prodan'
branding:
icon: 'command'
color: 'blue'
inputs:
helm-version:
description: Helm version to use
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.helm-version }}

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o pipefail
HELM_VERSION=$1
BIN_DIR="$GITHUB_WORKSPACE/bin"
main() {
mkdir -p ${BIN_DIR}
tmpDir=$(mktemp -d)
pushd $tmpDir >& /dev/null
curl -sSL https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar xz
cp linux-amd64/helm ${BIN_DIR}/helm
popd >& /dev/null
rm -rf $tmpDir
}
main
echo "::add-path::$BIN_DIR"
echo "::add-path::$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin"

38
.github/actions/kubeconform/action.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Setup kubeconform
description: A GitHub Action for running kubeconform commands
author: Stefan Prodan
branding:
color: blue
icon: command
inputs:
version:
description: "kubeconform version e.g. 0.5.0 (defaults to latest stable release)"
required: false
arch:
description: "arch can be amd64 or arm64"
required: true
default: "amd64"
runs:
using: composite
steps:
- name: "Download binary to the GH runner cache"
shell: bash
run: |
ARCH=${{ inputs.arch }}
VERSION=${{ inputs.version }}
if [ -z $VERSION ]; then
VERSION=$(curl https://api.github.com/repos/yannh/kubeconform/releases/latest -sL | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
fi
BIN_URL="https://github.com/yannh/kubeconform/releases/download/v${VERSION}/kubeconform-linux-${ARCH}.tar.gz"
BIN_DIR=$RUNNER_TOOL_CACHE/kubeconform/$VERSION/$ARCH
if [[ ! -x "$BIN_DIR/kind" ]]; then
mkdir -p $BIN_DIR
cd $BIN_DIR
curl -sL $BIN_URL | tar xz
chmod +x kubeconform
fi
echo "$BIN_DIR" >> "$GITHUB_PATH"

View File

@@ -1,6 +0,0 @@
FROM stefanprodan/alpine-base:latest
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,9 +0,0 @@
name: 'github-release-notes'
description: 'A GitHub Action to run github-release-notes commands'
author: 'Stefan Prodan'
branding:
icon: 'command'
color: 'blue'
runs:
using: 'docker'
image: 'Dockerfile'

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o pipefail
VERSION=0.2.0
BIN_DIR="$GITHUB_WORKSPACE/bin"
main() {
mkdir -p ${BIN_DIR}
tmpDir=$(mktemp -d)
pushd $tmpDir >& /dev/null
curl -sSL https://github.com/buchanae/github-release-notes/releases/download/${VERSION}/github-release-notes-linux-amd64-${VERSION}.tar.gz | tar xz
cp github-release-notes ${BIN_DIR}/github-release-notes
popd >& /dev/null
rm -rf $tmpDir
}
main
echo "::add-path::$BIN_DIR"
echo "::add-path::$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin"

View File

@@ -0,0 +1,24 @@
name: Runner Cleanup
description: A GitHub Action for removing bloat from Ubuntu GitHub Actions runner.
author: Stefan Prodan
branding:
color: blue
icon: command
runs:
using: composite
steps:
- name: "Disk Usage Before Cleanup"
shell: bash
run: |
df -h
- name: "Remove .NET, Android and Haskell"
shell: bash
run: |
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true
- name: "Disk Usage After Cleanup"
shell: bash
run: |
df -h

11
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
groups:
actions:
patterns:
- "*"
schedule:
interval: "weekly"

View File

@@ -1,51 +0,0 @@
package kubernetes
name = input.metadata.name
kind = input.kind
is_service {
input.kind = "Service"
}
is_deployment {
input.kind = "Deployment"
}
is_pod {
input.kind = "Pod"
}
split_image(image) = [image, "latest"] {
not contains(image, ":")
}
split_image(image) = [image_name, tag] {
[image_name, tag] = split(image, ":")
}
pod_containers(pod) = all_containers {
keys = {"containers", "initContainers"}
all_containers = [c | keys[k]; c = pod.spec[k][_]]
}
containers[container] {
pods[pod]
all_containers = pod_containers(pod)
container = all_containers[_]
}
containers[container] {
all_containers = pod_containers(input)
container = all_containers[_]
}
pods[pod] {
is_deployment
pod = input.spec.template
}
pods[pod] {
is_pod
pod = input
}

View File

@@ -1,43 +0,0 @@
package main
import data.kubernetes
name = input.metadata.name
# Deny containers with latest image tag
deny[msg] {
kubernetes.containers[container]
[image_name, "latest"] = kubernetes.split_image(container.image)
msg = sprintf("%s in the %s %s has an image %s, using the latest tag", [container.name, kubernetes.kind, kubernetes.name, image_name])
}
# Deny services without app label selector
service_labels {
input.spec.selector["app"]
}
deny[msg] {
kubernetes.is_service
not service_labels
msg = sprintf("Service %s should set app label selector", [name])
}
# Deny deployments without app label selector
match_labels {
input.spec.selector.matchLabels["app"]
}
deny[msg] {
kubernetes.is_deployment
not match_labels
msg = sprintf("Service %s should set app label selector", [name])
}
# Warn if deployments have no prometheus pod annotations
annotations {
input.spec.template.metadata.annotations["prometheus.io/scrape"]
input.spec.template.metadata.annotations["prometheus.io/port"]
}
warn[msg] {
kubernetes.is_deployment
not annotations
msg = sprintf("Deployment %s should set prometheus.io/scrape and prometheus.io/port pod annotations", [name])
}

View File

@@ -1,23 +1,25 @@
name: cve-scan
on:
workflow_dispatch:
push:
branches:
- 'master'
- "master"
pull_request:
branches:
- "master"
permissions:
contents: read
jobs:
trivy:
govulncheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build image
id: build
run: |
IMAGE=test/podinfo:${GITHUB_SHA}
docker build -t ${IMAGE} .
echo "::set-output name=image::$IMAGE"
- name: Scan image
uses: docker://docker.io/aquasec/trivy:latest
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/runner-cleanup
- name: Vulnerability scan
id: govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
args: --cache-dir /var/lib/trivy --no-progress --exit-code 1 --severity MEDIUM,HIGH,CRITICAL ${{ steps.build.outputs.image }}
repo-checkout: false

View File

@@ -6,45 +6,75 @@ on:
branches:
- 'master'
permissions:
contents: read
jobs:
kind-helm:
strategy:
matrix:
helm-version:
- 2.16.6
- 3.2.1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Disk Cleanup
uses: ./.github/actions/runner-cleanup
- name: Setup Kubernetes
uses: engineerd/setup-kind@v0.4.0
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
cluster_name: kind
- name: Build container image
run: |
GIT_COMMIT=$(git rev-list -1 HEAD) && \
docker build -t test/podinfo:latest --build-arg "REVISION=${GIT_COMMIT}" .
./test/build.sh
kind load docker-image test/podinfo:latest
- name: Setup Helm
uses: ./.github/actions/helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
helm-version: ${{ matrix.helm-version }}
- name: Install Tiller
if: ${{ startsWith(matrix.helm-version, '2') }}
run: |
kubectl --namespace kube-system create sa tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --upgrade --wait
version: v4.1.0
- name: Deploy
run: |
helm upgrade -i podinfo ./charts/podinfo \
--set image.repository=test/podinfo \
--set image.tag=latest \
--namespace=default
run: ./test/deploy.sh
- name: Run integration tests
run: |
kubectl rollout status deployment/podinfo --timeout=1m
helm test podinfo
run: ./test/test.sh
- name: Debug failure
if: failure()
run: |
kubectl logs -l app=podinfo || true
kind-timoni:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
env:
PODINFO_IMAGE_URL: "test/podinfo"
PODINFO_MODULE_URL: "oci://localhost:5000/podinfo"
PODINFO_VERSION: "0.0.0-devel"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/runner-cleanup
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@c68e33a34f17c7ca93c7fc6717d61a14819276dc # v0.26.0
- name: Setup Kubernetes
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
cluster_name: kind
- name: Build container
run: |
docker build -t ${PODINFO_IMAGE_URL}:${PODINFO_VERSION} --build-arg "REVISION=${GITHUB_SHA}" -f Dockerfile.xx .
kind load docker-image ${PODINFO_IMAGE_URL}:${PODINFO_VERSION}
- name: Vet module
run: |
timoni mod vet ./timoni/podinfo --debug
- name: Build module
run: |
timoni mod push ./timoni/podinfo ${PODINFO_MODULE_URL} -v ${PODINFO_VERSION}
- name: Apply bundle
run: |
timoni bundle apply -f ./timoni/bundles/test.podinfo.cue --runtime-from-env
- name: Verify status
run: |
timoni -n podinfo status backend
timoni -n podinfo status frontend
- name: Debug failure
if: failure()
run: |
kubectl -n podinfo get all || true

View File

@@ -2,45 +2,170 @@ name: release
on:
push:
tags: '*'
tags:
- '*'
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access
attestations: write # needed for provenance
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-buildx@v1
- name: Publish multi-arch image
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/runner-cleanup
- uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
- uses: fluxcd/flux2/action@871be9b40d53627786d3a3835a3ddba1e3234bd2 # v2.8.3
- uses: stefanprodan/timoni/actions/setup@c68e33a34f17c7ca93c7fc6717d61a14819276dc # v0.26.0
- name: Setup Notation CLI
uses: notaryproject/notation-action/setup@b6fee73110795d6793253c673bd723f12bcf9bbb # v1.2.2
with:
version: "1.1.0"
- name: Setup Notation signing keys
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker buildx build --platform "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64" \
--output "type=image,push=true" \
--build-arg "REVISION=${GITHUB_SHA}" \
--build-arg "VERSION=${GITHUB_REF#refs/tags/}" \
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag "docker.io/stefanprodan/podinfo:${GITHUB_REF#refs/tags/}" \
--tag "docker.io/stefanprodan/podinfo:latest" \
--file Dockerfile .
- name: Publish base image
uses: docker/build-push-action@v1
mkdir -p ~/.config/notation/localkeys/
cp ./.notation/signingkeys.json ~/.config/notation/
cp ./.notation/notation.crt ~/.config/notation/localkeys/
echo "$NOTATION_KEY" > ~/.config/notation/localkeys/notation.key
env:
NOTATION_KEY: ${{ secrets.NOTATION_SIGNING_KEY }}
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
- name: Setup Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
version: v4.1.1
- name: Setup QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: stefanprodan/podinfo-base
tags: latest
- name: Prepare
id: prep
run: |
VERSION=sha-${GITHUB_SHA::8}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF/refs\/tags\//}
fi
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "REVISION=${GITHUB_SHA}" >> $GITHUB_OUTPUT
- name: Generate images meta
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: |
docker.io/stefanprodan/podinfo
ghcr.io/stefanprodan/podinfo
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
type=raw,value=latest
- name: Publish multi-arch image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
sbom: true
provenance: true
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.xx
build-args: |
REVISION=${{ steps.prep.outputs.REVISION }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Publish Timoni module to GHCR
run: |
timoni mod push ./timoni/podinfo oci://ghcr.io/stefanprodan/modules/podinfo \
--sign cosign \
--version ${{ steps.prep.outputs.VERSION }} \
-a 'org.opencontainers.image.source=https://github.com/stefanprodan/podinfo' \
-a 'org.opencontainers.image.licenses=Apache-2.0' \
-a 'org.opencontainers.image.description=A timoni.sh module for deploying Podinfo.' \
-a 'org.opencontainers.image.documentation=https://github.com/stefanprodan/podinfo/blob/main/timoni/podinfo/README.md'
- name: Publish Helm chart to GHCR
run: |
helm package charts/podinfo
helm push podinfo-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/stefanprodan/charts
rm podinfo-${{ steps.prep.outputs.VERSION }}.tgz
- name: Publish Flux OCI artifact to GHCR
run: |
flux push artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} \
--path="./kustomize" \
--source="${{ github.event.repository.html_url }}" \
--revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
flux tag artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --tag latest
- name: Sign artifacts with Cosign
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign docker.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/charts/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --yes
- name: Publish base image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
platforms: linux/amd64
file: ./Dockerfile.base
tags: docker.io/stefanprodan/podinfo-base:latest
- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@master
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/release-notes
- name: Generate release notes
- name: Publish config artifact
run: |
echo 'CHANGELOG' > /tmp/release.txt
github-release-notes -org stefanprodan -repo podinfo -since-latest-release >> /tmp/release.txt
flux push artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} \
--path="./kustomize" \
--source="${{ github.event.repository.html_url }}" \
--revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
flux tag artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --tag latest
- name: Sign config artifact with cso
run: |
echo "$COSIGN_KEY" > /tmp/cosign.key
cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --yes
cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:latest --yes
env:
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
COSIGN_KEY: ${{secrets.COSIGN_KEY}}
- name: Sign artifacts with Notation
run: |
notation sign --signature-format cose ghcr.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }}
notation sign --signature-format cose ghcr.io/stefanprodan/charts/podinfo:${{ steps.prep.outputs.VERSION }}
notation sign --signature-format cose ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }}
notation sign --signature-format cose ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }}
notation sign --signature-format cose ghcr.io/stefanprodan/podinfo-deploy:latest
- name: Publish release
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
with:
version: latest
args: release --release-notes=/tmp/release.txt
args: release --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest release
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-checksums: ./dist/podinfo_${{ steps.prep.outputs.VERSION }}_checksums.txt

View File

@@ -6,38 +6,68 @@ on:
branches:
- 'master'
permissions:
contents: read
env:
KUBERNETES_VERSION: 1.35.0
HELM_VERSION: 4.1.1
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Go cache
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/runner-cleanup
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.14.x
go-version: 1.26.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup kubectl
uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
with:
version: v${{ env.KUBERNETES_VERSION }}
- name: Setup kubeconform
uses: ./.github/actions/kubeconform
- name: Setup Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
version: v${{ env.HELM_VERSION }}
- name: Setup CUE
uses: cue-lang/setup-cue@a93fa358375740cd8b0078f76355512b9208acb1 # v1.0.1
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@c68e33a34f17c7ca93c7fc6717d61a14819276dc # v0.26.0
- name: Run unit tests
run: make test
- name: Validate Helm chart
run: |
helm lint ./charts/podinfo/
helm template ./charts/podinfo/ | kubeconform -strict -summary -kubernetes-version ${{ env.KUBERNETES_VERSION }}
- name: Validate Kustomize overlay
run: |
kubectl kustomize ./kustomize/ | kubeconform -strict -summary -kubernetes-version ${{ env.KUBERNETES_VERSION }}
- name: Verify CUE formatting
working-directory: ./timoni/podinfo
run: |
cue fmt ./...
status=$(git status . --porcelain)
[[ -z "$status" ]] || {
echo "CUE files are not correctly formatted"
echo "$status"
git diff
exit 1
}
- name: Validate Timoni module
working-directory: ./timoni/podinfo
run: |
timoni mod lint .
timoni build podinfo . -f test_values.cue | kubeconform -strict -summary -skip=ServiceMonitor -kubernetes-version ${{ env.KUBERNETES_VERSION }}
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'run make test and commit changes'
exit 1
fi
- name: Validate Helm chart
uses: stefanprodan/kube-tools@v1
with:
command: |
helmv3 template ./charts/podinfo | kubeval --strict
- name: Validate kustomization
uses: stefanprodan/kube-tools@v1
with:
command: |
kustomize build ./kustomize | kubeval --strict
kustomize build ./kustomize | conftest test -p .github/policy -

8
.gitignore vendored
View File

@@ -19,4 +19,10 @@ release/
build/
gcloud/
dist/
bin/
bin/
cue/cue.mod/gen/
cue/go.mod
cue/go.sum
.notation/podinfo.csr
.notation/podinfo.key

View File

@@ -1,3 +1,18 @@
version: 2
# xref: https://goreleaser.com/customization/project/
project_name: podinfo
# xref: https://goreleaser.com/customization/hooks/
before:
hooks:
- go mod download
# xref: https://goreleaser.com/customization/env/
env:
- CGO_ENABLED=0
# xref: https://goreleaser.com/customization/build/
builds:
- main: ./cmd/podcli
binary: podcli
@@ -8,9 +23,13 @@ builds:
- linux
goarch:
- amd64
env:
- CGO_ENABLED=0
# xref: https://goreleaser.com/customization/archive/
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
- LICENSE
# xref: https://goreleaser.com/customization/changelog/
changelog:
use: github-native

15
.notation/README.md Normal file
View File

@@ -0,0 +1,15 @@
# Podinfo signed releases
Podinfo release assets such as the Helm chart and the Flux artifact
are published to GitHub Container Registry and are signed with
[Notation](https://github.com/notaryproject/notation).
## Generate signing keys
Generate a new signing key pair:
```sh
openssl genrsa -out podinfo.key 2048
openssl req -new -key podinfo.key -out podinfo.csr -config codesign.cnf
openssl x509 -req -days 1826 -in podinfo.csr -signkey podinfo.key -out notation.crt -extensions v3_req -extfile codesign.cnf
```

18
.notation/codesign.cnf Normal file
View File

@@ -0,0 +1,18 @@
[ req ]
default_bits = 2048
default_keyfile = privatekey.pem
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[ req_distinguished_name ]
C = RO
ST = BU
L = Bucharest
O = Notary
CN = stefanprodan.com
[ v3_req ]
keyUsage = critical,digitalSignature
extendedKeyUsage = critical,codeSigning
#subjectKeyIdentifier = hash

21
.notation/notation.crt Normal file
View File

@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDbDCCAlSgAwIBAgIUP7zhmTw5XTWLcgBGkBEsErMOkz4wDQYJKoZIhvcNAQEL
BQAwWjELMAkGA1UEBhMCUk8xCzAJBgNVBAgMAkJVMRIwEAYDVQQHDAlCdWNoYXJl
c3QxDzANBgNVBAoMBk5vdGFyeTEZMBcGA1UEAwwQc3RlZmFucHJvZGFuLmNvbTAe
Fw0yNDAyMjUxMDAyMzZaFw0yOTAyMjQxMDAyMzZaMFoxCzAJBgNVBAYTAlJPMQsw
CQYDVQQIDAJCVTESMBAGA1UEBwwJQnVjaGFyZXN0MQ8wDQYDVQQKDAZOb3Rhcnkx
GTAXBgNVBAMMEHN0ZWZhbnByb2Rhbi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDtH4oPi3SyX/DGv6NdjIvmApvD9eeSgsmHdwpAly8T9D2me+fx
Z+wRNJmq4aq/A1anX+Sg28iwHzV+1WKpsHnjYzDAJSEYP2S8A5H1nGRKUoibdijw
C3QBh5C75rjF/tmZVSX/Vgbf3HJJEsF4WUxWabLxoV2QLo7UlEsQd9+bSeKNMncx
1+E6FdbRCrYo90iobvZJ8K/S2zCWq/JTeHfTnmSEDhx6nMJcaSjvMPn3zyauWcQw
dDpkcaGiJ64fEJRT2OFxXv9u+vDmIMKzo/Wjbd+IzFj6YY4VisK88aU7tmDelnk5
gQB9eu62PFoaVsYJp4VOhblFKvGJpQwbWB9BAgMBAAGjKjAoMA4GA1UdDwEB/wQE
AwIHgDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAzANBgkqhkiG9w0BAQsFAAOCAQEA
6x+C6hAIbLwMvkNx4K5p7Qe/pLQR0VwQFAw10yr/5KSN+YKFpon6pQ0TebL7qll+
uBGZvtQhN6v+DlnVqB7lvJKd+89isgirkkews5KwuXg7Gv5UPIugH0dXISZU8DMJ
7J4oKREv5HzdFmfsUfNlQcfyVTjKL6UINXfKGdqNNxXxR9b4a1TY2JcmEhzBTHaq
ZqX6HK784a0dB7aHgeFrFwPCCP4M684Hs7CFbk3jo2Ef4ljnB5AyWpe8pwCLMdRt
UjSjL5xJWVQvRU+STQsPr6SvpokPCG4rLQyjgeYYk4CCj5piSxbSUZFavq8v1y7Y
m91USVqfeUX7ZzjDxPHE2A==
-----END CERTIFICATE-----

View File

@@ -0,0 +1,10 @@
{
"default": "stefanprodan.com",
"keys": [
{
"name": "stefanprodan.com",
"keyPath": "/home/runner/.config/notation/localkeys/notation.key",
"certPath": "/home/runner/.config/notation/localkeys/notation.crt"
}
]
}

View File

@@ -0,0 +1,19 @@
{
"version": "1.0",
"trustPolicies": [
{
"name": "stefanprodan.com",
"registryScopes": [
"ghcr.io/stefanprodan/podinfo-deploy",
"ghcr.io/stefanprodan/charts/podinfo"
],
"signatureVerification": {
"level" : "strict"
},
"trustStores": [ "ca:stefanprodan.com" ],
"trustedIdentities": [
"x509.subject: C=RO, ST=BU, L=Bucharest, O=Notary, CN=stefanprodan.com"
]
}
]
}

View File

@@ -1,4 +1,4 @@
FROM golang:1.14-alpine as builder
FROM golang:1.26-alpine AS builder
ARG REVISION
@@ -18,25 +18,16 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podcli cmd/podcli/*
FROM alpine:3.12
FROM alpine:3.23
ARG BUILD_DATE
ARG VERSION
ARG REVISION
LABEL maintainer="stefanprodan" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/stefanprodan/podinfo" \
org.opencontainers.image.source="https://github.com/stefanprodan/podinfo" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$REVISION \
org.opencontainers.image.vendor="stefanprodan" \
org.opencontainers.image.title="podinfo" \
org.opencontainers.image.description="Go microservice template for Kubernetes" \
org.opencontainers.image.licenses="MIT"
LABEL maintainer="stefanprodan"
RUN addgroup -S app \
&& adduser -S -g app app \
&& adduser -S -G app app \
&& apk --no-cache add \
ca-certificates curl netcat-openbsd

View File

@@ -1,4 +1,4 @@
FROM golang:1.14
FROM golang:1.26
WORKDIR /workspace

53
Dockerfile.xx Normal file
View File

@@ -0,0 +1,53 @@
ARG GO_VERSION=1.26
ARG XX_VERSION=1.9.0
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine as builder
# Copy the build utilities.
COPY --from=xx / /
ARG TARGETPLATFORM
ARG REVISION
RUN mkdir -p /podinfo/
WORKDIR /podinfo
COPY . .
RUN go mod download
ENV CGO_ENABLED=0
RUN xx-go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podinfo cmd/podinfo/*
RUN xx-go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podcli cmd/podcli/*
FROM alpine:3.23
ARG BUILD_DATE
ARG VERSION
ARG REVISION
LABEL maintainer="stefanprodan"
RUN addgroup -S app \
&& adduser -S -G app app \
&& apk --no-cache add \
ca-certificates curl netcat-openbsd
WORKDIR /home/app
COPY --from=builder /podinfo/bin/podinfo .
COPY --from=builder /podinfo/bin/podcli /usr/local/bin/podcli
COPY ./ui ./ui
RUN chown -R app:app ./
USER app
CMD ["./podinfo"]

214
LICENSE
View File

@@ -1,21 +1,201 @@
MIT License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (c) 2018 Stefan Prodan
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
1. Definitions.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Stefan Prodan. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -15,16 +15,22 @@ run:
--level=debug --grpc-port=9999 --backend-url=https://httpbin.org/status/401 --backend-url=https://httpbin.org/status/500 \
--ui-logo=https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/cuddle_clap.gif $(EXTRA_RUN_ARGS)
test:
go test -v -race ./...
.PHONY: test
test: tidy fmt vet
go test ./... -coverprofile cover.out
build:
GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" -a -o ./bin/podinfo ./cmd/podinfo/*
GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" -a -o ./bin/podcli ./cmd/podcli/*
tidy:
rm -f go.sum; go mod tidy -compat=1.26
vet:
go vet ./...
fmt:
gofmt -l -s -w ./
goimports -l -w ./
go fmt ./...
build-charts:
helm lint charts/*
@@ -33,6 +39,13 @@ build-charts:
build-container:
docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) .
build-xx:
docker buildx build \
--platform=linux/amd64 \
-t $(DOCKER_IMAGE_NAME):$(VERSION) \
--load \
-f Dockerfile.xx .
build-base:
docker build -f Dockerfile.base -t $(DOCKER_REPOSITORY)/podinfo-base:latest .
@@ -58,21 +71,34 @@ push-container:
version-set:
@next="$(TAG)" && \
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \
sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/frontend/deployment.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/backend/deployment.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/frontend/deployment.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/backend/deployment.yaml && \
echo "Version $$next set in code, deployment, chart and kustomize"
/usr/bin/sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
/usr/bin/sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values.yaml && \
/usr/bin/sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values-prod.yaml && \
/usr/bin/sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \
/usr/bin/sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/frontend/deployment.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/backend/deployment.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/frontend/deployment.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/backend/deployment.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/database/statefulset-primary.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/database/deployment-replica.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/database/cronjob-rollup-daily.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/database/cronjob-rollup-weekly.yaml && \
/usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/database/cronjob-backup-daily.yaml && \
/usr/bin/sed -i '' "s/$$current/$$next/g" timoni/podinfo/values.cue && \
echo "Version $$next set in code, deployment, module, chart and kustomize"
release:
git tag $(VERSION)
git tag -s -m $(VERSION) $(VERSION)
git push origin $(VERSION)
swagger:
go get github.com/swaggo/swag/cmd/swag
cd pkg/api && $$(go env GOPATH)/bin/swag init -g server.go
go install github.com/swaggo/swag/cmd/swag@latest
go get github.com/swaggo/swag/gen@latest
go get github.com/swaggo/swag/cmd/swag@latest
cd pkg/api/http && $$(go env GOPATH)/bin/swag init -g server.go
.PHONY: timoni-build
timoni-build:
@timoni build podinfo ./timoni/podinfo -f ./timoni/podinfo/debug_values.cue

146
README.md
View File

@@ -7,24 +7,25 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/stefanprodan/podinfo)](https://hub.docker.com/r/stefanprodan/podinfo)
Podinfo is a tiny web application made with Go that showcases best practices of running microservices in Kubernetes.
Podinfo is used by CNCF projects like [Flux](https://github.com/fluxcd/flux2) and [Flagger](https://github.com/fluxcd/flagger)
for end-to-end testing and workshops.
Specifications:
* Health checks (readiness and liveness)
* Graceful shutdown on interrupt signals
* File watcher for secrets and configmaps
* Instrumented with Prometheus
* Tracing with Istio and Jaeger
* Linkerd service profile
* Instrumented with Prometheus and Open Telemetry
* Structured logging with zap
* 12-factor app with viper
* Fault injection (random errors and latency)
* Swagger docs
* Helm and Kustomize installers
* Timoni, Helm and Kustomize installers
* End-to-End testing with Kubernetes Kind and Helm
* Kustomize testing with GitHub Actions and Open Policy Agent
* Multi-arch container image with Docker buildx and Github Actions
* CVE scanning with trivy
* Multi-arch container image with Docker buildx and GitHub Actions
* Container image signing with Sigstore cosign
* SBOMs and SLSA Provenance embedded in the container image
* CVE scanning with govulncheck
Web API:
@@ -56,6 +57,16 @@ Web API:
gRPC API:
* `/grpc.health.v1.Health/Check` health checking
* `/grpc.EchoService/Echo` echos the received content
* `/grpc.VersionService/Version` returns podinfo version and Git commit hash
* `/grpc.DelayService/Delay` returns a successful response after the given seconds in the body of gRPC request
* `/grpc.EnvService/Env` returns environment variables as a JSON array
* `/grpc.HeaderService/Header` returns the headers present in the gRPC request. Any custom header can also be given as a part of request and that can be returned using this API
* `/grpc.InfoService/Info` returns the runtime information
* `/grpc.PanicService/Panic` crashes the process with gRPC status code as '1 CANCELLED'
* `/grpc.StatusService/Status` returns the gRPC Status code given in the request body
* `/grpc.TokenService/TokenGenerate` issues a JWT token valid for one minute
* `/grpc.TokenService/TokenValidate` validates the JWT token
Web UI:
@@ -65,17 +76,26 @@ To access the Swagger UI open `<podinfo-host>/swagger/index.html` in a browser.
### Guides
* [GitOps Progressive Deliver with Flagger, Helm v3 and Linkerd](https://helm.workshop.flagger.dev/intro/)
* [GitOps Progressive Deliver on EKS with Flagger and AppMesh](https://eks.handson.flagger.dev/prerequisites/)
* [Automated canary deployments with Flagger and Istio](https://medium.com/google-cloud/automated-canary-deployments-with-flagger-and-istio-ac747827f9d1)
* [Kubernetes autoscaling with Istio metrics](https://medium.com/google-cloud/kubernetes-autoscaling-with-istio-metrics-76442253a45a)
* [Autoscaling EKS on Fargate with custom metrics](https://aws.amazon.com/blogs/containers/autoscaling-eks-on-fargate-with-custom-metrics/)
* [Managing Helm releases the GitOps way](https://medium.com/google-cloud/managing-helm-releases-the-gitops-way-207a6ac6ff0e)
* [Securing EKS Ingress With Contour And Lets Encrypt The GitOps Way](https://aws.amazon.com/blogs/containers/securing-eks-ingress-contour-lets-encrypt-gitops/)
* [Getting started with Timoni](https://timoni.sh/quickstart/)
* [Getting started with Flux](https://fluxcd.io/flux/get-started/)
* [Progressive Deliver with Flagger and Linkerd](https://docs.flagger.app/tutorials/linkerd-progressive-delivery)
* [Automated canary deployments with Kubernetes Gateway API](https://docs.flagger.app/tutorials/gatewayapi-progressive-delivery)
### Install
Helm:
To install Podinfo on Kubernetes the minimum required version is **Kubernetes v1.23**.
#### Timoni
Install with [Timoni](https://timoni.sh):
```bash
timoni -n default apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo
```
#### Helm
Install from github.io:
```bash
helm repo add podinfo https://stefanprodan.github.io/podinfo
@@ -86,23 +106,107 @@ helm upgrade --install --wait frontend \
--set backend=http://backend-podinfo:9898/echo \
podinfo/podinfo
# Test pods have hook-delete-policy: hook-succeeded
helm test frontend
helm test frontend --namespace test
helm upgrade --install --wait backend \
--namespace test \
--set hpa.enabled=true \
--set redis.enabled=true \
podinfo/podinfo
```
Kustomize:
Install from ghcr.io:
```bash
helm upgrade --install --wait podinfo --namespace default \
oci://ghcr.io/stefanprodan/charts/podinfo
```
#### Kustomize
```bash
kubectl apply -k github.com/stefanprodan/podinfo//kustomize
```
Docker:
#### Docker
```bash
docker run -dp 9898:9898 stefanprodan/podinfo
```
```
### Continuous Delivery
In order to install podinfo on a Kubernetes cluster and keep it up to date with the latest
release in an automated manner, you can use [Flux](https://fluxcd.io).
Install the Flux CLI on MacOS and Linux using Homebrew:
```sh
brew install fluxcd/tap/flux
```
Install the Flux controllers needed for Helm operations:
```sh
flux install \
--namespace=flux-system \
--network-policy=false \
--components=source-controller,helm-controller
```
Add podinfo's Helm repository to your cluster and
configure Flux to check for new chart releases every ten minutes:
```sh
flux create source helm podinfo \
--namespace=default \
--url=https://stefanprodan.github.io/podinfo \
--interval=10m
```
Create a `podinfo-values.yaml` file locally:
```sh
cat > podinfo-values.yaml <<EOL
replicaCount: 2
resources:
limits:
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
EOL
```
Create a Helm release for deploying podinfo in the default namespace:
```sh
flux create helmrelease podinfo \
--namespace=default \
--source=HelmRepository/podinfo \
--release-name=podinfo \
--chart=podinfo \
--chart-version=">5.0.0" \
--values=podinfo-values.yaml
```
Based on the above definition, Flux will upgrade the release automatically
when a new version of podinfo is released. If the upgrade fails, Flux
can [rollback](https://toolkit.fluxcd.io/components/helm/helmreleases/#configuring-failure-remediation)
to the previous working version.
You can check what version is currently deployed with:
```sh
flux get helmreleases -n default
```
To delete podinfo's Helm repository and release from your cluster run:
```sh
flux -n default delete source helm podinfo
flux -n default delete helmrelease podinfo
```
If you wish to manage the lifecycle of your applications in a **GitOps** manner, check out
this [workflow example](https://github.com/fluxcd/flux2-kustomize-helm-example)
for multi-env deployments with Flux, Kustomize and Helm.

View File

@@ -1,6 +1,6 @@
apiVersion: v1
version: 4.0.5
appVersion: 4.0.5
version: 6.11.2
appVersion: 6.11.2
name: podinfo
engine: gotpl
description: Podinfo Helm chart for Kubernetes
@@ -10,3 +10,4 @@ maintainers:
name: stefanprodan
sources:
- https://github.com/stefanprodan/podinfo
kubeVersion: ">=1.23.0-0"

201
charts/podinfo/LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Stefan Prodan. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,16 +1,38 @@
# Podinfo
Podinfo is a tiny web application made with Go
Podinfo is a tiny web application made with Go
that showcases best practices of running microservices in Kubernetes.
Podinfo is used by CNCF projects like [Flux](https://github.com/fluxcd/flux2)
and [Flagger](https://github.com/fluxcd/flagger)
for end-to-end testing and workshops.
## Installing the Chart
To install the chart with the release name `my-release`:
The Podinfo charts are published to
[GitHub Container Registry](https://github.com/stefanprodan/podinfo/pkgs/container/charts%2Fpodinfo)
and signed with [Cosign](https://github.com/sigstore/cosign) & GitHub Actions OIDC.
To install the chart with the release name `podinfo` from GHCR:
```console
$ helm repo add podinfo https://stefanprodan.github.io/podinfo
$ helm upgrade -i podinfo oci://ghcr.io/stefanprodan/charts/podinfo
```
$ helm upgrade -i my-release podinfo/podinfo
To verify a chart version with Cosign:
```console
$ cosign verify ghcr.io/stefanprodan/charts/podinfo:<VERSION> \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity-regexp=^https://github\\.com/stefanprodan/podinfo/.*$
```
Alternatively, you can install the chart from GitHub pages:
```console
$ helm repo add stefanprodan https://stefanprodan.github.io/podinfo
$ helm upgrade -i podinfo stefanprodan/podinfo
```
The command deploys podinfo on the Kubernetes cluster in the default namespace.
@@ -18,10 +40,10 @@ The [configuration](#configuration) section lists the parameters that can be con
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
To uninstall the `podinfo` release:
```console
$ helm delete my-release
$ helm uninstall podinfo
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
@@ -30,77 +52,101 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the podinfo chart and their default values.
Parameter | Default | Description
--- | --- | ---
`replicaCount` | `1` | Desired number of pods
`logLevel` | `info` | Log level: `debug`, `info`, `warn`, `error`, `flat` or `panic`
`backend` | `None` | Echo backend URL
`backends` | `[]` | Array of echo backend URLs
`cache` | `None` | Redis address in the format `<host>:<port>`
`redis.enabled` | `false` | Create Redis deployment for caching purposes
`ui.color` | `#34577c` | UI color
`ui.message` | `None` | UI greetings message
`ui.logo` | `None` | UI logo
`faults.delay` | `false` | Random HTTP response delays between 0 and 5 seconds
`faults.error` | `false` | 1/3 chances of a random HTTP response error
`faults.unhealthy` | `false` | When set, the healthy state is never reached
`faults.unready` | `false` | When set, the ready state is never reached
`faults.testFail` | `false` | When set, a helm test is included which always fails
`faults.testTimeout` | `false` | When set, a helm test is included which always times out
`h2c.enabled` | `false` | Allow upgrading to h2c
`image.repository` | `stefanprodan/podinfo` | Image repository
`image.tag` | `<VERSION>` | Image tag
`image.pullPolicy` | `IfNotPresent` | Image pull policy
`service.enabled` | `true` | Create a Kubernetes Service, should be disabled when using [Flagger](https://flagger.app)
`service.type` | `ClusterIP` | Type of the Kubernetes Service
`service.metricsPort` | `9797` | Prometheus metrics endpoint port
`service.httpPort` | `9898` | Container HTTP port
`service.externalPort` | `9898` | ClusterIP HTTP port
`service.grpcPort` | `9999` | ClusterIP gPRC port
`service.grpcService` | `podinfo` | gPRC service name
`service.nodePort` | `31198` | NodePort for the HTTP endpoint
`hpa.enabled` | `false` | Enables the Kubernetes HPA
`hpa.maxReplicas` | `10` | Maximum amount of pods
`hpa.cpu` | `None` | Target CPU usage per pod
`hpa.memory` | `None` | Target memory usage per pod
`hpa.requests` | `None` | Target HTTP requests per second per pod
`serviceAccount.enabled` | `false` | Whether a service account should be created
`serviceAccount.name` | `None` | The name of the service account to use, if not set and create is true, a name is generated using the fullname template
`linkerd.profile.enabled` | `false` | Create Linkerd service profile
`serviceMonitor.enabled` | `false` | Whether a Prometheus Operator service monitor should be created
`serviceMonitor.interval` | `15s` | Prometheus scraping interval
`ingress.enabled` | `false` | Enables Ingress
`ingress.annotations` | `{}` | Ingress annotations
`ingress.path` | `/*` | Ingress path
`ingress.hosts` | `[]` | Ingress accepted hosts
`ingress.tls` | `[]` | Ingress TLS configuration
`resources.requests.cpu` | `1m` | Pod CPU request
`resources.requests.memory` | `16Mi` | Pod memory request
`resources.limits.cpu` | `None` | Pod CPU limit
`resources.limits.memory` | `None` | Pod memory limit
`nodeSelector` | `{}` | Node labels for pod assignment
`tolerations` | `[]` | List of node taints to tolerate
`affinity` | `None` | Node/pod affinities
`podAnnotations` | `{}` | Pod annotations
| Parameter | Default | Description |
|--------------------------------------------------|--------------------------------|---------------------------------------------------------------------------------------------------|
| `replicaCount` | `1` | Desired number of pods |
| `logLevel` | `info` | Log level: `debug`, `info`, `warn`, `error` |
| `backend` | `None` | Echo backend URL |
| `backends` | `[]` | Array of echo backend URLs |
| `cache` | `None` | Redis address in the format `tcp://<host>:<port>` |
| `redis.enabled` | `false` | Create Redis deployment for caching purposes |
| `redis.repository` | `docker.io/redis` | Redis image repository |
| `redis.tag` | `<VERSION>` | Redis image tag |
| `redis.imagePullSecrets` | `[]` | Redis image pull secrets |
| `ui.color` | `#34577c` | UI color |
| `ui.message` | `None` | UI greetings message |
| `ui.logo` | `None` | UI logo |
| `faults.delay` | `false` | Random HTTP response delays between 0 and 5 seconds |
| `faults.error` | `false` | 1/3 chances of a random HTTP response error |
| `faults.unhealthy` | `false` | When set, the healthy state is never reached |
| `faults.unready` | `false` | When set, the ready state is never reached |
| `faults.testFail` | `false` | When set, a helm test is included which always fails |
| `faults.testTimeout` | `false` | When set, a helm test is included which always times out |
| `image.repository` | `ghcr.io/stefanprodan/podinfo` | Image repository |
| `image.tag` | `<VERSION>` | Image tag |
| `image.pullPolicy` | `IfNotPresent` | Image pull policy |
| `image.pullSecrets` | `[]` | Image pull secrets |
| `service.enabled` | `true` | Create a Kubernetes Service, should be disabled when using [Flagger](https://flagger.app) |
| `service.type` | `ClusterIP` | Type of the Kubernetes Service |
| `service.metricsPort` | `9797` | Prometheus metrics endpoint port |
| `service.httpPort` | `9898` | Container HTTP port |
| `service.externalPort` | `9898` | ClusterIP HTTP port |
| `service.grpcPort` | `9999` | ClusterIP gPRC port |
| `service.grpcService` | `podinfo` | gPRC service name |
| `service.nodePort` | `31198` | NodePort for the HTTP endpoint |
| `service.trafficDistribution` | `""` | Traffic distribution strategy |
| `service.additionalLabels` | `{}` | Additional labels to add to the service |
| `service.externalTrafficPolicy` | `None` | External traffic policy for LoadBalance service |
| `h2c.enabled` | `false` | Allow upgrading to h2c (non-TLS version of HTTP/2) |
| `extraArgs` | `[]` | Additional command line arguments to pass to podinfo container |
| `extraEnvs` | `[]` | Extra environment variables for the podinfo container |
| `config.path` | `""` | config file path |
| `config.name` | `""` | config file name |
| `hpa.enabled` | `false` | Enables the Kubernetes HPA |
| `hpa.maxReplicas` | `10` | Maximum amount of pods |
| `hpa.cpu` | `None` | Target CPU usage per pod |
| `hpa.memory` | `None` | Target memory usage per pod |
| `hpa.requests` | `None` | Target HTTP requests per second per pod |
| `serviceAccount.enabled` | `false` | Whether a service account should be created |
| `serviceAccount.name` | `None` | The name of the service account to use, if not set a name is generated using the fullname template|
| `serviceAccount.imagePullSecrets` | `[]` | List of image pull secrets if pulling from private registries |
| `securityContext` | `{}` | The security context to be set on the podinfo container |
| `podSecurityContext` | `{}` | The security context to be set on the pod |
| `podAnnotations` | `{}` | Pod annotations |
| `serviceMonitor.enabled` | `false` | Whether a Prometheus Operator service monitor should be created |
| `serviceMonitor.interval` | `15s` | Prometheus scraping interval |
| `serviceMonitor.additionalLabels` | `{}` | Add additional labels to the service monitor |
| `ingress.enabled` | `false` | Enables Ingress |
| `ingress.className` | `""` | Use ingressClassName |
| `ingress.additionalLabels` | `{}` | Add additional labels to the ingress |
| `ingress.annotations` | `{}` | Ingress annotations |
| `ingress.hosts` | `[]` | Ingress accepted hosts |
| `ingress.tls` | `[]` | Ingress TLS configuration |
| `httpRoute.enabled` | `false` | Enables Gateway API HTTPRoute |
| `httpRoute.additionalLabels` | `{}` | Add additional labels to the HTTPRoute |
| `httpRoute.annotations` | `{}` | HTTPRoute annotations |
| `httpRoute.parentRefs` | `[]` | Gateways that this route is attached to |
| `httpRoute.hostnames` | `["podinfo.local"]` | Hostnames matching HTTP header |
| `httpRoute.rules` | `[]` | List of rules and filters applied |
| `hooks.<hookType>.job.enabled` | `false` | Create a Helm hook job for testing (hookType: see values.yaml for available hooks) |
| `hooks.<hookType>.job.hookDeletePolicy` | `hook-succeeded,hook-failed` | Helm hook delete policy |
| `hooks.<hookType>.job.ttlSecondsAfterFinished` | `None` | Job TTL after finished |
| `hooks.<hookType>.job.sleepSeconds` | `None` | Sleep duration before job exits |
| `hooks.<hookType>.job.exitCode` | `0` | Job exit code |
| `resources.requests.cpu` | `1m` | Pod CPU request |
| `resources.requests.memory` | `16Mi` | Pod memory request |
| `resources.limits.cpu` | `None` | Pod CPU limit |
| `resources.limits.memory` | `None` | Pod memory limit |
| `nodeSelector` | `{}` | Node labels for pod assignment |
| `tolerations` | `[]` | List of node taints to tolerate |
| `affinity` | `None` | Node/pod affinities |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
Specify each parameter using the `--set key=value[,key=value]` argument:
```console
$ helm install my-release podinfo/podinfo \
$ helm upgrade -i podinfo oci://ghcr.io/stefanprodan/charts/podinfo \
--set=serviceMonitor.enabled=true,serviceMonitor.interval=5s
```
To add custom annotations you need to escape the annotation key string:
```console
$ helm upgrade -i my-release podinfo/podinfo \
--set podAnnotations."appmesh\.k8s\.aws\/preview"=enabled
$ helm upgrade -i podinfo oci://ghcr.io/stefanprodan/charts/podinfo \
--set podAnnotations."toolkit\.fluxcd\.io\/tenant"=dev-team
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart:
```console
$ helm install my-release podinfo/podinfo -f values.yaml
$ helm upgrade -i my-release oci://ghcr.io/stefanprodan/charts/podinfo -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)

View File

@@ -1,18 +1,20 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "podinfo.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
export NODE_PORT=$(kubectl get --namespace {{ include "podinfo.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "podinfo.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ include "podinfo.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "podinfo.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "podinfo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export SERVICE_IP=$(kubectl get svc --namespace {{ include "podinfo.namespace" . }} {{ template "podinfo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl -n {{ .Release.Namespace }} port-forward deploy/{{ template "podinfo.fullname" . }} 8080:{{ .Values.service.externalPort }}
kubectl -n {{ include "podinfo.namespace" . }} port-forward deploy/{{ template "podinfo.fullname" . }} 8080:{{ .Values.service.externalPort }}
{{- end }}

View File

@@ -1,10 +1,9 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "podinfo.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
@@ -12,32 +11,66 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "podinfo.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Allow the release namespace to be overridden for multi-namespace deployments in combined charts.
*/}}
{{- define "podinfo.namespace" -}}
{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "podinfo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "podinfo.labels" -}}
helm.sh/chart: {{ include "podinfo.chart" . }}
{{ include "podinfo.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "podinfo.selectorLabels" -}}
app.kubernetes.io/name: {{ include "podinfo.fullname" . }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "podinfo.serviceAccountName" -}}
{{- if .Values.serviceAccount.enabled -}}
{{ default (include "podinfo.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{- if .Values.serviceAccount.enabled }}
{{- default (include "podinfo.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Create the name of the tls secret for secure port
*/}}
{{- define "podinfo.tlsSecretName" -}}
{{- $fullname := include "podinfo.fullname" . -}}
{{- default (printf "%s-tls" $fullname) .Values.tls.secretName }}
{{- end }}

View File

@@ -0,0 +1,17 @@
{{- if .Values.certificate.create -}}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ template "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
spec:
dnsNames:
{{- range .Values.certificate.dnsNames }}
- {{ . | quote }}
{{- end }}
secretName: {{ template "podinfo.tlsSecretName" . }}
issuerRef:
{{- .Values.certificate.issuerRef | toYaml | trimSuffix "\n" | nindent 4 }}
{{- end }}

View File

@@ -2,11 +2,9 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
app: {{ template "podinfo.fullname" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "podinfo.labels" . | nindent 4 }}
spec:
{{- if not .Values.hpa.enabled }}
replicas: {{ .Values.replicaCount }}
@@ -17,11 +15,11 @@ spec:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "podinfo.fullname" . }}
{{- include "podinfo.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: {{ template "podinfo.fullname" . }}
{{- include "podinfo.selectorLabels" . | nindent 8 }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.service.httpPort }}"
@@ -33,13 +31,37 @@ spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ template "podinfo.serviceAccountName" . }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets: {{ toYaml .Values.image.pullSecrets | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- else if (or .Values.service.hostPort .Values.tls.hostPort) }}
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
{{- end }}
command:
- ./podinfo
- --port={{ .Values.service.httpPort | default 9898 }}
{{- if .Values.host }}
- --host={{ .Values.host }}
{{- end }}
{{- if .Values.tls.enabled }}
- --secure-port={{ .Values.tls.port }}
{{- end }}
{{- if .Values.tls.certPath }}
- --cert-path={{ .Values.tls.certPath }}
{{- end }}
{{- if .Values.service.metricsPort }}
- --port-metrics={{ .Values.service.metricsPort }}
{{- end }}
@@ -55,7 +77,7 @@ spec:
{{- if .Values.cache }}
- --cache-server={{ .Values.cache }}
{{- else if .Values.redis.enabled }}
- --cache-server={{ template "podinfo.fullname" . }}:6379
- --cache-server=tcp://{{ template "podinfo.fullname" . }}-redis:6379
{{- end }}
- --level={{ .Values.logLevel }}
- --random-delay={{ .Values.faults.delay }}
@@ -69,6 +91,15 @@ spec:
{{- if .Values.h2c.enabled }}
- --h2c
{{- end }}
{{- with .Values.config.path }}
- --config-path={{ . }}
{{- end }}
{{- with .Values.config.name }}
- --config={{ . }}
{{- end }}
{{- with .Values.extraArgs }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- if .Values.ui.message }}
- name: PODINFO_UI_MESSAGE
@@ -80,16 +111,30 @@ spec:
{{- end }}
{{- if .Values.ui.color }}
- name: PODINFO_UI_COLOR
value: {{ .Values.ui.color }}
value: {{ quote .Values.ui.color }}
{{- end }}
{{- if .Values.backend }}
- name: PODINFO_BACKEND_URL
value: {{ .Values.backend }}
{{- end }}
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.httpPort | default 9898 }}
protocol: TCP
{{- if .Values.service.hostPort }}
hostPort: {{ .Values.service.hostPort }}
{{- end }}
{{- if .Values.tls.enabled }}
- name: https
containerPort: {{ .Values.tls.port | default 9899 }}
protocol: TCP
{{- if .Values.tls.hostPort }}
hostPort: {{ .Values.tls.hostPort }}
{{- end }}
{{- end }}
{{- if .Values.service.metricsPort }}
- name: http-metrics
containerPort: {{ .Values.service.metricsPort }}
@@ -100,6 +145,22 @@ spec:
containerPort: {{ .Values.service.grpcPort }}
protocol: TCP
{{- end }}
{{- if .Values.probes.startup.enable }}
startupProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.service.httpPort | default 9898 }}/healthz
{{- with .Values.probes.startup }}
initialDelaySeconds: {{ .initialDelaySeconds | default 1 }}
timeoutSeconds: {{ .timeoutSeconds | default 5 }}
failureThreshold: {{ .failureThreshold | default 3 }}
successThreshold: {{ .successThreshold | default 1 }}
periodSeconds: {{ .periodSeconds | default 10 }}
{{- end }}
{{- end }}
livenessProbe:
exec:
command:
@@ -107,8 +168,13 @@ spec:
- check
- http
- localhost:{{ .Values.service.httpPort | default 9898 }}/healthz
initialDelaySeconds: 1
timeoutSeconds: 5
{{- with .Values.probes.liveness }}
initialDelaySeconds: {{ .initialDelaySeconds | default 1 }}
timeoutSeconds: {{ .timeoutSeconds | default 5 }}
failureThreshold: {{ .failureThreshold | default 3 }}
successThreshold: {{ .successThreshold | default 1 }}
periodSeconds: {{ .periodSeconds | default 10 }}
{{- end }}
readinessProbe:
exec:
command:
@@ -116,13 +182,27 @@ spec:
- check
- http
- localhost:{{ .Values.service.httpPort | default 9898 }}/readyz
initialDelaySeconds: 1
timeoutSeconds: 5
{{- with .Values.probes.readiness }}
initialDelaySeconds: {{ .initialDelaySeconds | default 1 }}
timeoutSeconds: {{ .timeoutSeconds | default 5 }}
failureThreshold: {{ .failureThreshold | default 3 }}
successThreshold: {{ .successThreshold | default 1 }}
periodSeconds: {{ .periodSeconds | default 10 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /data
{{- if .Values.tls.enabled }}
- name: tls
mountPath: {{ .Values.tls.certPath | default "/data/cert" }}
readOnly: true
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.podSecurityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
@@ -138,3 +218,12 @@ spec:
volumes:
- name: data
emptyDir: {}
{{- if .Values.tls.enabled }}
- name: tls
secret:
secretName: {{ template "podinfo.tlsSecretName" . }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if .Values.grpcRoute.enabled -}}
{{- $fullName := include "podinfo.fullname" . -}}
{{- $grpcPort := .Values.service.grpcPort -}}
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {{ $fullName }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.grpcRoute.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.grpcRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.grpcRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.grpcRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.grpcRoute.rules }}
- backendRefs:
- name: {{ $fullName }}
port: {{ $grpcPort }}
weight: 1
{{- with .matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,37 @@
{{- $hooks := dict "preInstall" "pre-install" "postInstall" "post-install" "preDelete" "pre-delete" "postDelete" "post-delete" "preUpgrade" "pre-upgrade" "postUpgrade" "post-upgrade" "preRollback" "pre-rollback" "postRollback" "post-rollback" }}
{{- range $hookName, $hookType := $hooks }}
{{- $hookConfig := index $.Values.hooks $hookName }}
{{- if and $hookConfig $hookConfig.job $hookConfig.job.enabled }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "podinfo.fullname" $ }}-{{ $hookType }}
namespace: {{ include "podinfo.namespace" $ }}
labels:
{{- include "podinfo.labels" $ | nindent 4 }}
annotations:
"helm.sh/hook": {{ $hookType }}
"helm.sh/hook-delete-policy": {{ $hookConfig.job.hookDeletePolicy }}
spec:
{{- if kindIs "float64" $hookConfig.job.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ $hookConfig.job.ttlSecondsAfterFinished | int }}
{{- end }}
template:
spec:
containers:
- name: job
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
command:
- sh
- -c
- |
{{- if kindIs "float64" $hookConfig.job.sleepSeconds }}
sleep {{ $hookConfig.job.sleepSeconds | int }}
{{- end }}
exit {{ $hookConfig.job.exitCode | default 0 }}
restartPolicy: Never
backoffLimit: 1
{{- end }}
{{- end }}

View File

@@ -1,8 +1,11 @@
{{- if .Values.hpa.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
@@ -15,18 +18,25 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.hpa.cpu }}
target:
type: Utilization
averageUtilization: {{ .Values.hpa.cpu }}
{{- end }}
{{- if .Values.hpa.memory }}
- type: Resource
resource:
name: memory
targetAverageValue: {{ .Values.hpa.memory }}
target:
type: AverageValue
averageValue: {{ .Values.hpa.memory }}
{{- end }}
{{- if .Values.hpa.requests }}
- type: Pod
pods:
metricName: http_requests
targetAverageValue: {{ .Values.hpa.requests }}
- type: Pods
pods:
metric:
name: http_requests
target:
type: AverageValue
averageValue: {{ .Values.hpa.requests }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "podinfo.fullname" . -}}
{{- $svcPort := .Values.service.externalPort -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.httpRoute.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.httpRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.httpRoute.rules }}
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- end }}

View File

@@ -1,46 +1,45 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "podinfo.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: networking.k8s.io/v1beta1
{{- $svcPort := .Values.service.externalPort -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ include "podinfo.namespace" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.ingress.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- path: {{ $ingressPath }}
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- if not .Values.ingress.hosts }}
- http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,96 +0,0 @@
{{- if .Values.linkerd.profile.enabled -}}
apiVersion: linkerd.io/v1alpha2
kind: ServiceProfile
metadata:
name: {{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
spec:
routes:
- condition:
method: GET
pathRegex: /
name: GET /
- condition:
method: POST
pathRegex: /api/echo
name: POST /api/echo
- condition:
method: GET
pathRegex: /api/info
name: GET /api/info
- condition:
method: GET
pathRegex: /chunked/[^/]*
name: GET /chunked/{seconds}
- condition:
method: GET
pathRegex: /delay/[^/]*
name: GET /delay/{seconds}
- condition:
method: GET
pathRegex: /env
name: GET /env
- condition:
method: GET
pathRegex: /headers
name: GET /headers
- condition:
method: GET
pathRegex: /healthz
name: GET /healthz
- condition:
method: GET
pathRegex: /metrics
name: GET /metrics
- condition:
method: GET
pathRegex: /panic
name: GET /panic
- condition:
method: GET
pathRegex: /readyz
name: GET /readyz
- condition:
method: POST
pathRegex: /readyz/disable
name: POST /readyz/disable
- condition:
method: POST
pathRegex: /readyz/enable
name: POST /readyz/enable
- condition:
method: GET
pathRegex: /status/[^/]*
name: GET /status/{code}
- condition:
method: POST
pathRegex: /cache
name: POST /cache
- condition:
method: GET
pathRegex: /cache/[^/]*
name: GET /cache/{hash}
- condition:
method: POST
pathRegex: /store
name: POST /store
- condition:
method: GET
pathRegex: /store/[^/]*
name: GET /store/{hash}
- condition:
method: POST
pathRegex: /token
name: POST /token
- condition:
method: POST
pathRegex: /token/validate
name: POST /token/validate
- condition:
method: GET
pathRegex: /version
name: GET /version
- condition:
method: POST
pathRegex: /ws/echo
name: POST /ws/echo
{{- end }}

View File

@@ -0,0 +1,14 @@
{{- if and .Values.podDisruptionBudget (gt (int .Values.replicaCount) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "podinfo.selectorLabels" . | nindent 6 }}
{{- toYaml .Values.podDisruptionBudget | nindent 2 }}
{{- end }}

View File

@@ -21,6 +21,9 @@ spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ template "podinfo.serviceAccountName" . }}
{{- end }}
{{- if .Values.redis.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.redis.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: redis
image: "{{ .Values.redis.repository }}:{{ .Values.redis.tag }}"

View File

@@ -14,4 +14,5 @@ spec:
port: 6379
protocol: TCP
targetPort: redis
appProtocol: redis
{{- end }}

View File

@@ -3,11 +3,16 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.service.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
@@ -18,6 +23,12 @@ spec:
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if .Values.tls.enabled }}
- port: {{ .Values.tls.port | default 9899 }}
targetPort: https
protocol: TCP
name: https
{{- end }}
{{- if .Values.service.grpcPort }}
- port: {{ .Values.service.grpcPort }}
targetPort: grpc
@@ -25,5 +36,11 @@ spec:
name: grpc
{{- end }}
selector:
app: {{ template "podinfo.fullname" . }}
{{- end }}
{{- include "podinfo.selectorLabels" . | nindent 4 }}
{{- if .Values.service.trafficDistribution }}
trafficDistribution: {{ .Values.service.trafficDistribution }}
{{- end }}
{{- if ( and (.Values.service.externalTrafficPolicy) (eq .Values.service.type "LoadBalancer") ) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
{{- end }}

View File

@@ -4,8 +4,9 @@ kind: ServiceAccount
metadata:
name: {{ template "podinfo.serviceAccountName" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end -}}
{{- end -}}

View File

@@ -3,17 +3,21 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "podinfo.fullname" . }}
namespace: {{ include "podinfo.namespace" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
port: http
interval: {{ .Values.serviceMonitor.interval }}
namespaceSelector:
matchNames:
- {{ include "podinfo.namespace" . }}
selector:
matchLabels:
app: {{ template "podinfo.fullname" . }}
{{- include "podinfo.selectorLabels" . | nindent 6 }}
{{- end }}

View File

@@ -3,11 +3,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-cache-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
@@ -27,6 +25,6 @@ spec:
curl -s -XDELETE ${PODINFO_SVC}/cache/test
env:
- name: PODINFO_SVC
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
value: "{{ template "podinfo.fullname" . }}.{{ include "podinfo.namespace" . }}:{{ .Values.service.externalPort }}"
restartPolicy: Never
{{- end }}

View File

@@ -3,11 +3,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded

View File

@@ -2,11 +2,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-grpc-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
@@ -18,5 +16,5 @@ spec:
- name: grpc-health-probe
image: stefanprodan/grpc_health_probe:v0.3.0
command: ['grpc_health_probe']
args: ['-addr={{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.grpcPort }}']
args: ['-addr={{ template "podinfo.fullname" . }}.{{ include "podinfo.namespace" . }}:{{ .Values.service.grpcPort }}']
restartPolicy: Never

View File

@@ -2,11 +2,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-jwt-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
@@ -25,5 +23,5 @@ spec:
curl -sH "Authorization: Bearer ${TOKEN}" ${PODINFO_SVC}/token/validate | grep test
env:
- name: PODINFO_SVC
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
value: "{{ template "podinfo.fullname" . }}.{{ include "podinfo.namespace" . }}:{{ .Values.service.externalPort }}"
restartPolicy: Never

View File

@@ -2,11 +2,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-service-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
@@ -24,5 +22,5 @@ spec:
curl -s ${PODINFO_SVC}/api/info | grep version
env:
- name: PODINFO_SVC
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
value: "{{ template "podinfo.fullname" . }}.{{ include "podinfo.namespace" . }}:{{ .Values.service.externalPort }}"
restartPolicy: Never

View File

@@ -3,11 +3,9 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "podinfo.name" . }}
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded

View File

@@ -0,0 +1,28 @@
{{- if .Values.tls.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "podinfo.fullname" . }}-tls-test-{{ randAlphaNum 5 | lower }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
sidecar.istio.io/inject: "false"
linkerd.io/inject: disabled
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
spec:
containers:
- name: curl
image: curlimages/curl:7.69.0
command:
- sh
- -c
- |
curl -sk ${PODINFO_SVC}/api/info | grep version
env:
- name: PODINFO_SVC
value: "https://{{ template "podinfo.fullname" . }}.{{ include "podinfo.namespace" . }}:{{ .Values.tls.port }}"
restartPolicy: Never
{{- end }}

View File

@@ -0,0 +1,210 @@
# Production values for podinfo.
# Includes Redis deployment and memory limits.
replicaCount: 1
logLevel: info
backend: #http://backend-podinfo:9898/echo
backends: []
image:
repository: ghcr.io/stefanprodan/podinfo
tag: 6.11.2
pullPolicy: IfNotPresent
ui:
color: "#34577c"
message: ""
logo: ""
# failure conditions
faults:
delay: false
error: false
unhealthy: false
unready: false
testFail: false
testTimeout: false
# Kubernetes Service settings
service:
enabled: true
annotations: {}
additionalLabels: { }
type: ClusterIP
metricsPort: 9797
httpPort: 9898
externalPort: 9898
grpcPort: 9999
grpcService: podinfo
nodePort: 31198
trafficDistribution: ""
externalTrafficPolicy: ""
# enable h2c protocol (non-TLS version of HTTP/2)
h2c:
enabled: false
# config file settings
config:
# config file path
path: ""
# config file name
name: ""
# Additional command line arguments to pass to podinfo container
extraArgs: []
# enable tls on the podinfo service
tls:
enabled: false
# the name of the secret used to mount the certificate key pair
secretName:
# the path where the certificate key pair will be mounted
certPath: /data/cert
# the port used to host the tls endpoint on the service
port: 9899
# the port used to bind the tls port to the host
# NOTE: requires privileged container with NET_BIND_SERVICE capability -- this is useful for testing
# in local clusters such as kind without port forwarding
hostPort:
# create a certificate manager certificate (cert-manager required)
certificate:
create: false
# the issuer used to issue the certificate
issuerRef:
kind: ClusterIssuer
name: self-signed
# the hostname / subject alternative names for the certificate
dnsNames:
- podinfo
# metrics-server add-on required
hpa:
enabled: true
maxReplicas: 5
# average total CPU usage per pod (1-100)
cpu: 99
# average memory usage per pod (100Mi-1Gi)
memory:
# average http requests per second per pod (k8s-prometheus-adapter)
requests:
# Redis address in the format tcp://<host>:<port>
cache: ""
# Redis deployment
redis:
enabled: true
repository: redis
tag: 8.6.1
serviceAccount:
# Specifies whether a service account should be created
enabled: false
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
# List of image pull secrets if pulling from private registries
imagePullSecrets: []
# set container security context
securityContext: {}
# set pod security context
podSecurityContext: {}
# -- Expose the service via Kubernetes Ingress
# Requires an Ingress controller
# Docs https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
className: ""
additionalLabels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: podinfo.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# -- Expose the service via Gateway HTTPRoute
# Requires a Gateway controller
# Docs https://gateway-api.sigs.k8s.io/guides/
httpRoute:
# HTTPRoute enabled.
enabled: false
# Add additional labels to the HTTPRoute.
additionalLabels: {}
# HTTPRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- podinfo.local
# List of rules and filters applied.
rules:
- matches:
- path:
type: PathPrefix
value: /
# create Prometheus Operator monitor
serviceMonitor:
enabled: false
interval: 15s
additionalLabels: {}
resources:
limits:
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
# Extra environment variables for the podinfo container
extraEnvs: []
# Example on how to configure extraEnvs
# - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
# value: "http://otel:4317"
# - name: MULTIPLE_VALUES
# value: TEST
nodeSelector: {}
tolerations: []
affinity: {}
podAnnotations: {}
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
probes:
readiness:
initialDelaySeconds: 1
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
periodSeconds: 10
liveness:
initialDelaySeconds: 1
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
periodSeconds: 10
startup:
enable: false
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 20
successThreshold: 1
periodSeconds: 10

View File

@@ -2,14 +2,22 @@
replicaCount: 1
logLevel: info
host: #0.0.0.0
backend: #http://backend-podinfo:9898/echo
backends: []
image:
repository: ghcr.io/stefanprodan/podinfo
tag: 6.11.2
pullPolicy: IfNotPresent
pullSecrets: []
ui:
color: "#34577c"
message: ""
logo: ""
# failure conditions
faults:
delay: false
error: false
@@ -18,16 +26,11 @@ faults:
testFail: false
testTimeout: false
h2c:
enabled: false
image:
repository: stefanprodan/podinfo
tag: 4.0.5
pullPolicy: IfNotPresent
# Kubernetes Service settings
service:
enabled: true
annotations: {}
additionalLabels: { }
type: ClusterIP
metricsPort: 9797
httpPort: 9898
@@ -35,6 +38,119 @@ service:
grpcPort: 9999
grpcService: podinfo
nodePort: 31198
# the port used to bind the http port to the host
# NOTE: requires privileged container with NET_BIND_SERVICE capability -- this is useful for testing
# in local clusters such as kind without port forwarding
hostPort:
# Stable from Kubernetes v1.33+ with a value of PreferClose. Additional values are PreferSameZone and PreferSameNode from v1.34+. Empty string means it's disabled.
trafficDistribution: ""
externalTrafficPolicy: ""
# enable h2c protocol (non-TLS version of HTTP/2)
h2c:
enabled: false
# config file settings
config:
# config file path
path: ""
# config file name
name: ""
# Additional command line arguments to pass to podinfo container
extraArgs: []
# Extra environment variables for the podinfo container
extraEnvs: []
# Example on how to configure extraEnvs
# - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
# value: "http://otel:4317"
# - name: MULTIPLE_VALUES
# value: TEST
# enable tls on the podinfo service
tls:
enabled: false
# the name of the secret used to mount the certificate key pair
secretName:
# the path where the certificate key pair will be mounted
certPath: /data/cert
# the port used to host the tls endpoint on the service
port: 9899
# the port used to bind the tls port to the host
# NOTE: requires privileged container with NET_BIND_SERVICE capability -- this is useful for testing
# in local clusters such as kind without port forwarding
hostPort:
# create a certificate manager certificate (cert-manager required)
certificate:
create: false
# the issuer used to issue the certificate
issuerRef:
kind: ClusterIssuer
name: self-signed
# the hostname / subject alternative names for the certificate
dnsNames:
- podinfo
# Helm hooks (for testing purposes)
hooks:
preInstall:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
postInstall:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
preDelete:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
postDelete:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
preUpgrade:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
postUpgrade:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
preRollback:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
postRollback:
job:
enabled: false
hookDeletePolicy: hook-succeeded,hook-failed
ttlSecondsAfterFinished:
sleepSeconds:
exitCode: 0
# metrics-server add-on required
hpa:
@@ -47,13 +163,14 @@ hpa:
# average http requests per second per pod (k8s-prometheus-adapter)
requests:
# Redis address in the format <host>:<port>
# Redis address in the format tcp://<host>:<port>
cache: ""
# Redis deployment
redis:
enabled: false
repository: redis
tag: 6.0.1
repository: docker.io/redis
tag: 8.6.1
imagePullSecrets: []
serviceAccount:
# Specifies whether a service account should be created
@@ -61,28 +178,88 @@ serviceAccount:
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
# List of image pull secrets if pulling from private registries
imagePullSecrets: []
linkerd:
profile:
enabled: false
# set container security context
securityContext: {}
serviceMonitor:
enabled: false
interval: 15s
# set pod security context
podSecurityContext: {}
# -- Expose the service via Kubernetes Ingress
# Requires an Ingress controller
# Docs https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
className: ""
additionalLabels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /*
hosts: []
# - podinfo.local
hosts:
- host: podinfo.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# -- Expose the service via Gateway HTTPRoute
# Requires a Gateway controller
# Docs https://gateway-api.sigs.k8s.io/guides/
httpRoute:
# HTTPRoute enabled.
enabled: false
# Add additional labels to the HTTPRoute.
additionalLabels: {}
# HTTPRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- podinfo.local
# List of rules and filters applied.
rules:
- matches:
- path:
type: PathPrefix
value: /
# -- Expose the gRPC service via Gateway GRPCRoute
# Requires a Gateway controller with GRPCRoute support
# Docs https://gateway-api.sigs.k8s.io/guides/grpc-routing/
grpcRoute:
# GRPCRoute enabled.
enabled: false
# Add additional labels to the GRPCRoute.
additionalLabels: {}
# GRPCRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- podinfo.local
# List of rules applied.
rules:
- {}
# create Prometheus Operator monitor
serviceMonitor:
enabled: false
interval: 15s
additionalLabels: {}
resources:
limits:
requests:
@@ -96,3 +273,32 @@ tolerations: []
affinity: {}
podAnnotations: {}
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
topologySpreadConstraints: []
# Disruption budget will be configured only when the replicaCount is greater than 1
podDisruptionBudget: {}
# maxUnavailable: 1
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
probes:
readiness:
initialDelaySeconds: 1
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
periodSeconds: 10
liveness:
initialDelaySeconds: 1
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
periodSeconds: 10
startup:
enable: false
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 20
successThreshold: 1
periodSeconds: 10

View File

@@ -1,4 +0,0 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build','-f' , 'Dockerfile', '-t', 'gcr.io/$PROJECT_ID/podinfo:$BRANCH_NAME-$SHORT_SHA', '.']
images: ['gcr.io/$PROJECT_ID/podinfo:$BRANCH_NAME-$SHORT_SHA']

View File

@@ -12,10 +12,13 @@ import (
"strings"
"time"
"github.com/gorilla/websocket"
"github.com/spf13/cobra"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/status"
)
@@ -27,6 +30,7 @@ var (
body string
timeout time.Duration
grpcServiceName string
grpcTLS bool
)
var checkCmd = &cobra.Command{
@@ -63,6 +67,13 @@ var checkgRPCCmd = &cobra.Command{
RunE: runCheckgPRC,
}
var checkWsCmd = &cobra.Command{
Use: `ws [address]`,
Short: "WebSocket round-trip health check",
Example: ` check ws ws://localhost:9898/ws/echo --retry=1 --delay=2s --timeout=5s`,
RunE: runCheckWs,
}
func init() {
checkUrlCmd.Flags().StringVar(&method, "method", "GET", "HTTP method")
checkUrlCmd.Flags().StringVar(&body, "body", "", "HTTP POST/PUT content")
@@ -80,10 +91,16 @@ func init() {
checkgRPCCmd.Flags().DurationVar(&retryDelay, "delay", 1*time.Second, "wait duration between retries")
checkgRPCCmd.Flags().DurationVar(&timeout, "timeout", 5*time.Second, "timeout")
checkgRPCCmd.Flags().StringVar(&grpcServiceName, "service", "", "gRPC service name")
checkgRPCCmd.Flags().BoolVar(&grpcTLS, "tls", false, "use TLS for gRPC connection")
checkCmd.AddCommand(checkgRPCCmd)
checkCmd.AddCommand(checkCertCmd)
checkWsCmd.Flags().IntVar(&retryCount, "retry", 0, "times to retry the WebSocket check")
checkWsCmd.Flags().DurationVar(&retryDelay, "delay", 1*time.Second, "wait duration between retries")
checkWsCmd.Flags().DurationVar(&timeout, "timeout", 5*time.Second, "timeout")
checkCmd.AddCommand(checkWsCmd)
rootCmd.AddCommand(checkCmd)
}
@@ -262,6 +279,72 @@ func fmtContentLength(b int64) string {
return fmt.Sprintf("%.1f %cB", float64(b)/float64(div), "kMGTPE"[exp])
}
func runCheckWs(cmd *cobra.Command, args []string) error {
if retryCount < 0 {
return fmt.Errorf("--retry is required")
}
if len(args) < 1 {
return fmt.Errorf("address is required! example: check ws wss://localhost:9898/ws/echo")
}
address := args[0]
if !strings.HasPrefix(address, "ws://") && !strings.HasPrefix(address, "wss://") {
return fmt.Errorf("address must start with ws:// or wss://")
}
for n := 0; n <= retryCount; n++ {
if n != 0 {
time.Sleep(retryDelay)
}
dialer := websocket.Dialer{
HandshakeTimeout: timeout,
}
conn, _, err := dialer.Dial(address, nil)
if err != nil {
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
msg := "podinfo-check"
start := time.Now()
conn.SetWriteDeadline(start.Add(timeout))
if err := conn.WriteMessage(websocket.TextMessage, []byte(msg)); err != nil {
conn.Close()
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
conn.SetReadDeadline(time.Now().Add(timeout))
_, resp, err := conn.ReadMessage()
if err != nil {
conn.Close()
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
rtt := time.Since(start)
conn.Close()
logger.Info("check succeed",
zap.String("address", address),
zap.Duration("round-trip", rtt),
zap.Int("response size", len(resp)))
os.Exit(0)
}
os.Exit(1)
return nil
}
func runCheckgPRC(cmd *cobra.Command, args []string) error {
if retryCount < 0 {
return fmt.Errorf("--retry is required")
@@ -271,12 +354,19 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
}
address := args[0]
var creds grpc.DialOption
if grpcTLS {
creds = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
} else {
creds = grpc.WithTransportCredentials(insecure.NewCredentials())
}
for n := 0; n <= retryCount; n++ {
if n != 1 {
if n != 0 {
time.Sleep(retryDelay)
}
conn, err := grpc.Dial(address, grpc.WithInsecure())
conn, err := grpc.NewClient(address, creds)
if err != nil {
logger.Info("check failed",
zap.String("address", address),
@@ -291,13 +381,14 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
if err != nil {
if stat, ok := status.FromError(err); ok && stat.Code() == codes.Unimplemented {
logger.Info("gPRC health protocol not implemented")
logger.Info("gRPC health protocol not implemented")
os.Exit(1)
} else {
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
}
conn.Close()
continue
}
@@ -305,7 +396,6 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
logger.Info("check succeed",
zap.String("status", resp.GetStatus().String()))
os.Exit(0)
}
os.Exit(1)

View File

@@ -1,365 +0,0 @@
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/hashicorp/go-getter"
"github.com/spf13/cobra"
)
var (
codeProjectName string
codeGitUser string
codeVersion string
codeProjectPath string
)
var codeCmd = &cobra.Command{
Use: `code`,
Short: "Code commands",
}
var codeInitCmd = &cobra.Command{
Use: `init [name]`,
Short: "initialize podinfo code repo",
Example: ` code init demo-app --version=v1.2.0 --git-user=stefanprodan`,
RunE: runCodeInit,
}
func init() {
codeInitCmd.Flags().StringVar(&codeGitUser, "git-user", "", "GitHub user or org")
codeInitCmd.Flags().StringVar(&codeVersion, "version", "master", "podinfo repo tag or branch name")
codeInitCmd.Flags().StringVar(&codeProjectPath, "path", ".", "destination repo")
codeCmd.AddCommand(codeInitCmd)
rootCmd.AddCommand(codeCmd)
}
func runCodeInit(cmd *cobra.Command, args []string) error {
if len(codeGitUser) < 0 {
return fmt.Errorf("--git-user is required")
}
if len(args) < 1 {
return fmt.Errorf("project name is required")
}
codeProjectName = args[0]
pwd, err := os.Getwd()
if err != nil {
log.Fatalf("Error getting pwd: %s", err)
os.Exit(1)
}
tmpPath := "/tmp/k8s-podinfo"
versionName := fmt.Sprintf("k8s-podinfo-%s", codeVersion)
downloadURL := fmt.Sprintf("https://github.com/stefanprodan/podinfo/archive/%s.zip", codeVersion)
client := &getter.Client{
Src: downloadURL,
Dst: tmpPath,
Pwd: pwd,
Mode: getter.ClientModeAny,
}
fmt.Printf("Downloading %s\n", downloadURL)
if err := client.Get(); err != nil {
log.Fatalf("Error downloading: %s", err)
os.Exit(1)
}
pkgFrom := "github.com/stefanprodan/podinfo"
pkgTo := fmt.Sprintf("github.com/%s/%s", codeGitUser, codeProjectName)
if err := replaceImports(tmpPath, pkgFrom, pkgTo); err != nil {
log.Fatalf("Error parsing imports: %s", err)
os.Exit(1)
}
dirs := []string{"pkg", "cmd", "ui", "vendor", ".github"}
for _, dir := range dirs {
err = os.MkdirAll(path.Join(codeProjectPath, dir), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
if err := copyDir(path.Join(tmpPath, versionName, dir), path.Join(codeProjectPath, dir)); err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
files := []string{"Gopkg.toml", "Gopkg.lock"}
for _, file := range files {
if err := copyFile(path.Join(tmpPath, versionName, file), path.Join(codeProjectPath, file)); err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
fileContent, err := ioutil.ReadFile(path.Join(codeProjectPath, file))
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
newContent := strings.Replace(string(fileContent), pkgFrom, pkgTo, -1)
err = ioutil.WriteFile(path.Join(codeProjectPath, file), []byte(newContent), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
projFrom := "stefanprodan/podinfo"
projTo := fmt.Sprintf("%s/%s", codeGitUser, codeProjectName)
makeFiles := []string{"Makefile.gh", "Dockerfile.gh"}
for _, file := range makeFiles {
fileContent, err := ioutil.ReadFile(path.Join(tmpPath, versionName, file))
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
destFile := strings.Replace(file, ".gh", "", -1)
newContent := strings.Replace(string(fileContent), projFrom, projTo, -1)
err = ioutil.WriteFile(path.Join(codeProjectPath, destFile), []byte(newContent), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
workflows := []string{".github/main.workflow"}
for _, file := range workflows {
fileContent, err := ioutil.ReadFile(path.Join(codeProjectPath, file))
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
newContent := strings.Replace(string(fileContent), "Dockerfile.gh", "Dockerfile", -1)
err = ioutil.WriteFile(path.Join(codeProjectPath, file), []byte(newContent), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
dockerFiles := []string{"Dockerfile.ci"}
for _, file := range dockerFiles {
fileContent, err := ioutil.ReadFile(path.Join(tmpPath, versionName, file))
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
newContent := strings.Replace(string(fileContent), projFrom, projTo, -1)
err = ioutil.WriteFile(path.Join(codeProjectPath, file), []byte(newContent), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
travisFiles := []string{"travis.lite.yml"}
for _, file := range travisFiles {
fileContent, err := ioutil.ReadFile(path.Join(tmpPath, versionName, file))
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
destFile := strings.Replace(file, "travis.lite.yml", ".travis.yml", -1)
newContent := strings.Replace(string(fileContent), projFrom, projTo, -1)
err = ioutil.WriteFile(path.Join(codeProjectPath, destFile), []byte(newContent), os.ModePerm)
if err != nil {
log.Fatalf("Error: %s", err)
os.Exit(1)
}
}
err = gitPush()
if err != nil {
log.Fatalf("git push error: %s", err)
os.Exit(1)
}
fmt.Println("Initialization finished")
return nil
}
func gitPush() error {
cmdPush := fmt.Sprintf("git add . && git commit -m \"sync %s\" && git push", codeVersion)
cmd := exec.Command("sh", "-c", cmdPush)
output, err := cmd.Output()
if err != nil {
return err
}
fmt.Println(string(output))
return nil
}
func replaceImports(projectPath string, pkgFrom string, pkgTo string) error {
regexImport, err := regexp.Compile(`(?s)(import(.*?)\)|import.*$)`)
if err != nil {
return err
}
regexImportedPackage, err := regexp.Compile(`"(.*?)"`)
if err != nil {
return err
}
found := []string{}
err = filepath.Walk(projectPath, func(path string, info os.FileInfo, err error) error {
if filepath.Ext(path) == ".go" {
bts, err := ioutil.ReadFile(path)
if err != nil {
return err
}
content := string(bts)
matches := regexImport.FindAllString(content, -1)
isExists := false
isReplaceable:
for _, each := range matches {
for _, eachLine := range strings.Split(each, "\n") {
matchesInline := regexImportedPackage.FindAllString(eachLine, -1)
if err != nil {
return err
}
for _, eachSubline := range matchesInline {
if strings.Contains(eachSubline, pkgFrom) {
isExists = true
break isReplaceable
}
}
}
}
if isExists {
content = strings.Replace(content, `"`+pkgFrom+`"`, `"`+pkgTo+`"`, -1)
content = strings.Replace(content, `"`+pkgFrom+`/`, `"`+pkgTo+`/`, -1)
found = append(found, path)
}
err = ioutil.WriteFile(path, []byte(content), info.Mode())
if err != nil {
return err
}
}
return nil
})
if err != nil {
fmt.Println("ERROR", err.Error())
}
if len(found) == 0 {
fmt.Println("Nothing replaced")
} else {
fmt.Printf("Go imports total %d file replaced\n", len(found))
}
return nil
}
func copyDir(src string, dst string) error {
si, err := os.Stat(src)
if err != nil {
return err
}
if !si.IsDir() {
return fmt.Errorf("source is not a directory")
}
err = os.MkdirAll(dst, si.Mode())
if err != nil {
return err
}
entries, err := ioutil.ReadDir(src)
if err != nil {
return err
}
for _, entry := range entries {
srcPath := filepath.Join(src, entry.Name())
dstPath := filepath.Join(dst, entry.Name())
if entry.IsDir() {
err = copyDir(srcPath, dstPath)
if err != nil {
return err
}
} else {
// Skip symlinks.
if entry.Mode()&os.ModeSymlink != 0 {
continue
}
err = copyFile(srcPath, dstPath)
if err != nil {
return err
}
}
}
return nil
}
func copyFile(src, dst string) (err error) {
in, err := os.Open(src)
if err != nil {
return
}
defer in.Close()
out, err := os.Create(dst)
if err != nil {
return
}
defer func() {
if e := out.Close(); e != nil {
err = e
}
}()
_, err = io.Copy(out, in)
if err != nil {
return
}
err = out.Sync()
if err != nil {
return
}
si, err := os.Stat(src)
if err != nil {
return
}
err = os.Chmod(dst, si.Mode())
if err != nil {
return
}
return
}

View File

@@ -1,8 +1,8 @@
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@@ -11,42 +11,55 @@ import (
"github.com/spf13/pflag"
"github.com/spf13/viper"
"go.opentelemetry.io/contrib/bridges/otelzap"
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc"
sdklog "go.opentelemetry.io/otel/sdk/log"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/stefanprodan/podinfo/pkg/api"
"github.com/stefanprodan/podinfo/pkg/grpc"
"github.com/stefanprodan/podinfo/pkg/api/grpc"
"github.com/stefanprodan/podinfo/pkg/api/http"
"github.com/stefanprodan/podinfo/pkg/signals"
"github.com/stefanprodan/podinfo/pkg/version"
go_grpc "google.golang.org/grpc"
)
func main() {
// flags definition
fs := pflag.NewFlagSet("default", pflag.ContinueOnError)
fs.Int("port", 9898, "HTTP port")
fs.String("host", "", "Host to bind service to")
fs.Int("port", 9898, "HTTP port to bind service to")
fs.Int("secure-port", 0, "HTTPS port")
fs.Int("port-metrics", 0, "metrics port")
fs.Int("grpc-port", 0, "gRPC port")
fs.String("grpc-service-name", "podinfo", "gPRC service name")
fs.String("level", "info", "log level debug, info, warn, error, flat or panic")
fs.String("level", "info", "log level debug, info, warn, error, fatal or panic")
fs.StringSlice("backend-url", []string{}, "backend service URL")
fs.Duration("http-client-timeout", 2*time.Minute, "client timeout duration")
fs.Duration("http-server-timeout", 30*time.Second, "server read and write timeout duration")
fs.Duration("http-server-shutdown-timeout", 5*time.Second, "server graceful shutdown timeout duration")
fs.Duration("server-shutdown-timeout", 5*time.Second, "server graceful shutdown timeout duration")
fs.String("data-path", "/data", "data local path")
fs.String("config-path", "", "config dir path")
fs.String("cert-path", "/data/cert", "certificate path for HTTPS port")
fs.String("config", "config.yaml", "config file name")
fs.String("ui-path", "./ui", "UI local path")
fs.String("ui-logo", "", "UI logo")
fs.String("ui-color", "#34577c", "UI color")
fs.String("ui-message", fmt.Sprintf("greetings from podinfo v%v", version.VERSION), "UI message")
fs.Bool("h2c", false, "allow upgrading to H2C")
fs.Bool("random-delay", false, "between 0 and 5 seconds random delay")
fs.Bool("random-delay", false, "between 0 and 5 seconds random delay by default")
fs.String("random-delay-unit", "s", "either s(seconds) or ms(milliseconds")
fs.Int("random-delay-min", 0, "min for random delay: 0 by default")
fs.Int("random-delay-max", 5, "max for random delay: 5 by default")
fs.Bool("random-error", false, "1/3 chances of a random response error")
fs.Bool("unhealthy", false, "when set, healthy state is never reached")
fs.Bool("unready", false, "when set, ready state is never reached")
fs.Int("stress-cpu", 0, "number of CPU cores with 100 load")
fs.Int("stress-memory", 0, "MB of data to load into memory")
fs.String("cache-server", "", "Redis address in the format <host>:<port>")
fs.String("cache-server", "", "Redis address in the format 'tcp://<host>:<port>'")
fs.String("otel-service-name", "", "service name for OpenTelemetry, when not set tracing and log export are disabled")
versionFlag := fs.BoolP("version", "v", false, "get version number")
@@ -78,16 +91,26 @@ func main() {
viper.AutomaticEnv()
// load config from file
if _, err := os.Stat(filepath.Join(viper.GetString("config-path"), viper.GetString("config"))); err == nil {
if _, fileErr := os.Stat(filepath.Join(viper.GetString("config-path"), viper.GetString("config"))); fileErr == nil {
viper.SetConfigName(strings.Split(viper.GetString("config"), ".")[0])
viper.AddConfigPath(viper.GetString("config-path"))
if err := viper.ReadInConfig(); err != nil {
fmt.Printf("Error reading config file, %v\n", err)
if readErr := viper.ReadInConfig(); readErr != nil {
fmt.Printf("Error reading config file, %v\n", readErr)
}
}
// initialize OTel log provider if service name is set
var loggerProvider *sdklog.LoggerProvider
if otelServiceName := viper.GetString("otel-service-name"); otelServiceName != "" {
var err error
loggerProvider, err = initLoggerProvider(context.Background(), otelServiceName)
if err != nil {
fmt.Fprintf(os.Stderr, "Error initializing OTel log provider: %s\n", err.Error())
}
}
// configure logging
logger, _ := initZap(viper.GetString("level"))
logger, _ := initZap(viper.GetString("level"), loggerProvider)
defer logger.Sync()
stdLog := zap.RedirectStdLog(logger)
defer stdLog()
@@ -101,6 +124,26 @@ func main() {
viper.Set("port", strconv.Itoa(port))
}
// validate secure port
if _, err := strconv.Atoi(viper.GetString("secure-port")); err != nil {
securePort, _ := fs.GetInt("secure-port")
viper.Set("secure-port", strconv.Itoa(securePort))
}
// validate random delay options
if viper.GetInt("random-delay-max") < viper.GetInt("random-delay-min") {
logger.Panic("`--random-delay-max` should be greater than `--random-delay-min`")
}
switch delayUnit := viper.GetString("random-delay-unit"); delayUnit {
case
"s",
"ms":
break
default:
logger.Panic("`random-delay-unit` accepted values are: s|ms")
}
// load gRPC server config
var grpcCfg grpc.Config
if err := viper.Unmarshal(&grpcCfg); err != nil {
@@ -108,13 +151,16 @@ func main() {
}
// start gRPC server
var grpcServer *go_grpc.Server
if grpcCfg.Port > 0 {
grpcSrv, _ := grpc.NewServer(&grpcCfg, logger)
go grpcSrv.ListenAndServe()
//grpcinfoSrv, _ := grpc.NewInfoServer(&grpcCfg)
grpcServer = grpcSrv.ListenAndServe()
}
// load HTTP server config
var srvCfg api.Config
var srvCfg http.Config
if err := viper.Unmarshal(&srvCfg); err != nil {
logger.Panic("config unmarshal failed", zap.Error(err))
}
@@ -127,12 +173,35 @@ func main() {
)
// start HTTP server
srv, _ := api.NewServer(&srvCfg, logger)
srv, _ := http.NewServer(&srvCfg, logger)
httpServer, httpsServer, healthy, ready := srv.ListenAndServe()
// graceful shutdown
stopCh := signals.SetupSignalHandler()
srv.ListenAndServe(stopCh)
sd, _ := signals.NewShutdown(srvCfg.ServerShutdownTimeout, logger)
sd.SetLoggerProvider(loggerProvider)
sd.Graceful(stopCh, httpServer, httpsServer, grpcServer, healthy, ready)
}
func initZap(logLevel string) (*zap.Logger, error) {
func initLoggerProvider(ctx context.Context, serviceName string) (*sdklog.LoggerProvider, error) {
exporter, err := otlploggrpc.New(ctx)
if err != nil {
return nil, fmt.Errorf("creating OTLP log exporter: %w", err)
}
provider := sdklog.NewLoggerProvider(
sdklog.WithProcessor(sdklog.NewBatchProcessor(exporter)),
sdklog.WithResource(resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String(serviceName),
semconv.ServiceVersionKey.String(version.VERSION),
)),
)
return provider, nil
}
func initZap(logLevel string, loggerProvider *sdklog.LoggerProvider) (*zap.Logger, error) {
level := zap.NewAtomicLevelAt(zapcore.InfoLevel)
switch logLevel {
case "debug":
@@ -176,7 +245,21 @@ func initZap(logLevel string) (*zap.Logger, error) {
ErrorOutputPaths: []string{"stderr"},
}
return zapConfig.Build()
logger, err := zapConfig.Build()
if err != nil {
return nil, err
}
if loggerProvider != nil {
otelCore := otelzap.NewCore("github.com/stefanprodan/podinfo",
otelzap.WithLoggerProvider(loggerProvider),
)
logger = logger.WithOptions(zap.WrapCore(func(core zapcore.Core) zapcore.Core {
return zapcore.NewTee(core, otelCore)
}))
}
return logger, nil
}
var stressMemoryPayload []byte
@@ -211,12 +294,12 @@ func beginStressTest(cpus int, mem int, logger *zap.Logger) {
logger.Error("memory stress failed", zap.Error(err))
}
stressMemoryPayload, err = ioutil.ReadFile(path)
stressMemoryPayload, err = os.ReadFile(path)
f.Close()
os.Remove(path)
if err != nil {
logger.Error("memory stress failed", zap.Error(err))
}
logger.Info("starting CPU stress", zap.Int("memory", len(stressMemoryPayload)))
logger.Info("starting MEMORY stress", zap.Int("memory", len(stressMemoryPayload)))
}
}

View File

@@ -1,6 +1,7 @@
# Deploy demo webapp
# Deploy demo webapp
Demo webapp manifests:
- [common](webapp/common)
- [frontend](webapp/frontend)
- [backend](webapp/backend)
@@ -30,3 +31,15 @@ Deploy the demo in the `production` namespace:
```bash
kustomize build ./overlays/production | kubectl apply -f-
```
## Testing Locally Using Kind
> NOTE: You can install [kind from here](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
The following will create a new cluster called "podinfo" and configure host ports on 80 and 443. You can access the
endpoints on localhost. The example also deploys cert-manager within the cluster along with a self-signed cluster issuer
used to generate the certificate to validate the secure port.
```sh
./kind.sh
```

View File

@@ -12,18 +12,18 @@ spec:
type: RollingUpdate
selector:
matchLabels:
app: backend
app.kubernetes.io/name: backend
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9797"
labels:
app: backend
app.kubernetes.io/name: backend
spec:
containers:
- name: backend
image: stefanprodan/podinfo:4.0.5
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -42,7 +42,7 @@ spec:
- --grpc-port=9999
- --grpc-service-name=backend
- --level=info
- --cache-server=cache:6379
- --cache-server=tcp://cache:6379
env:
- name: PODINFO_UI_COLOR
value: "#34577c"

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v2beta2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: backend

View File

@@ -5,7 +5,7 @@ metadata:
spec:
type: ClusterIP
selector:
app: backend
app.kubernetes.io/name: backend
ports:
- name: http
port: 9898

View File

@@ -5,15 +5,15 @@ metadata:
spec:
selector:
matchLabels:
app: cache
app.kubernetes.io/name: cache
template:
metadata:
labels:
app: cache
app.kubernetes.io/name: cache
spec:
containers:
- name: redis
image: redis:6.0.1
image: docker.io/redis:8.6.1
imagePullPolicy: IfNotPresent
command:
- redis-server

View File

@@ -5,7 +5,7 @@ metadata:
spec:
type: ClusterIP
selector:
app: cache
app.kubernetes.io/name: cache
ports:
- name: redis
port: 6379

View File

@@ -0,0 +1,76 @@
# Database Setup
This directory contains the Kubernetes manifests to simulate a database setup
with a primary database, read replicas, and scheduled maintenance tasks using CronJobs.
## Components
### Core Resources
| Resource | File | Description |
|----------|------|-------------|
| ServiceAccount | `serviceaccount.yaml` | Shared service account for all database workloads |
| PVC | `pvc-primary.yaml` | 1Gi persistent storage for primary database |
| StatefulSet | `statefulset-primary.yaml` | Primary database with persistent storage at `/data` |
| Deployment | `deployment-replica.yaml` | Read replica deployment |
| Service (Headless) | `service-primary.yaml` | Headless service for StatefulSet |
| Service | `service-replica.yaml` | ClusterIP service for replicas |
| HPA | `hpa-replica.yaml` | Autoscaler for replicas (2-3 pods, 99% CPU) |
### CronJobs
| CronJob | Schedule | Duration | TTL Cleanup | Description |
|---------|----------|----------|-------------|-------------|
| `rollup-daily` | Every 10 min | ~1 min | 1 hour | Daily rollup simulation (6 iterations) |
| `rollup-weekly` | Every 30 min | ~2 min | 1 day | Weekly rollup simulation (12 iterations) |
| `backup-daily` | Daily at midnight | ~1 min | 1 day | Backup simulation (configured to fail) |
### Scripts
Located in `scripts/` directory:
- `rollup.sh` - Rollup simulation script with configurable steps via `ROLLUP_STEPS` env var
- `backup.sh` - Backup simulation script with configurable exit code via `BACKUP_EXIT` env var
## Labels
All resources use Kubernetes recommended labels:
- `app.kubernetes.io/name` - Component name
- `app.kubernetes.io/part-of: database` - Part of database application
## Configuration
### Primary Database
- **Port**: 3306 (MySQL standard)
- **Storage**: 1Gi PersistentVolumeClaim mounted at `/data`
- **Service**: Headless (`clusterIP: None`) for StatefulSet
### Replica Database
- **Port**: 3306
- **Scaling**: HPA with 2-3 replicas at 99% CPU utilization
- **Service**: ClusterIP
### CronJob Scripts
The scripts check database-replica health before running:
```sh
podcli check http database-replica:3306/readyz
```
## Usage
Deploy with Kustomize:
```bash
kubectl apply -k deploy/bases/database
```
Or include in an overlay:
```yaml
# kustomization.yaml
resources:
- ../../bases/database
```

View File

@@ -0,0 +1,48 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: backup-daily
spec:
# Runs every day at midnight for 1 minute
schedule: "0 0 * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
# Cleanup after 1 day
ttlSecondsAfterFinished: 86400
backoffLimit: 1
template:
metadata:
labels:
app.kubernetes.io/name: backup-daily
app.kubernetes.io/part-of: database
spec:
serviceAccountName: database
restartPolicy: Never
containers:
- name: backup
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- /scripts/backup.sh
env:
- name: BACKUP_EXIT
value: "1"
resources:
limits:
cpu: 100m
memory: 32Mi
requests:
cpu: 10m
memory: 16Mi
volumeMounts:
- name: scripts
mountPath: /scripts
volumes:
- name: scripts
configMap:
name: backup-script
defaultMode: 0755

View File

@@ -0,0 +1,48 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: rollup-daily
spec:
# Runs every 10 minutes for 1 minute
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
# Cleanup after 1 hour
ttlSecondsAfterFinished: 3600
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/name: rollup-daily
app.kubernetes.io/part-of: database
spec:
serviceAccountName: database
restartPolicy: OnFailure
containers:
- name: healthcheck
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- /scripts/rollup.sh
env:
- name: ROLLUP_STEPS
value: "6"
resources:
limits:
cpu: 100m
memory: 32Mi
requests:
cpu: 10m
memory: 16Mi
volumeMounts:
- name: scripts
mountPath: /scripts
volumes:
- name: scripts
configMap:
name: rollup-script
defaultMode: 0755

View File

@@ -0,0 +1,48 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: rollup-weekly
spec:
# Runs every 30 minutes for 2 minutes
schedule: "*/30 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
# Cleanup after 1 day
ttlSecondsAfterFinished: 86400
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/name: rollup-weekly
app.kubernetes.io/part-of: database
spec:
serviceAccountName: database
restartPolicy: OnFailure
containers:
- name: healthcheck
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- /scripts/rollup.sh
env:
- name: ROLLUP_STEPS
value: "12"
resources:
limits:
cpu: 100m
memory: 32Mi
requests:
cpu: 10m
memory: 16Mi
volumeMounts:
- name: scripts
mountPath: /scripts
volumes:
- name: scripts
configMap:
name: rollup-script
defaultMode: 0755

View File

@@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: database-replica
spec:
minReadySeconds: 3
revisionHistoryLimit: 5
progressDeadlineSeconds: 60
strategy:
rollingUpdate:
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app.kubernetes.io/name: database-replica
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9797"
labels:
app.kubernetes.io/name: database-replica
app.kubernetes.io/part-of: database
spec:
serviceAccountName: database
containers:
- name: database
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
ports:
- name: db
containerPort: 3306
protocol: TCP
- name: http-metrics
containerPort: 9797
protocol: TCP
command:
- ./podinfo
- --port=3306
- --port-metrics=9797
- --level=info
livenessProbe:
exec:
command:
- podcli
- check
- http
- localhost:3306/healthz
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
exec:
command:
- podcli
- check
- http
- localhost:3306/readyz
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: 2000m
memory: 512Mi
requests:
cpu: 100m
memory: 32Mi

View File

@@ -0,0 +1,18 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: database-replica
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: database-replica
minReplicas: 2
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 99

View File

@@ -0,0 +1,24 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- serviceaccount.yaml
- pvc-primary.yaml
- statefulset-primary.yaml
- deployment-replica.yaml
- service-primary.yaml
- service-replica.yaml
- hpa-replica.yaml
- cronjob-rollup-daily.yaml
- cronjob-rollup-weekly.yaml
- cronjob-backup-daily.yaml
configMapGenerator:
- name: rollup-script
files:
- scripts/rollup.sh
options:
disableNameSuffixHash: true
- name: backup-script
files:
- scripts/backup.sh
options:
disableNameSuffixHash: true

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: database-primary
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -e
# This is a simulation of a backup process.
EXIT_CODE=${BACKUP_EXIT:-0}
echo "Starting backup (estimated run time: 60s)"
podcli check http database-replica:3306/readyz
sleep 60
echo "Backup finished"
exit $EXIT_CODE

View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
# This is a simulation of a rollup process.
STEPS=${ROLLUP_STEPS:-6}
echo "Starting rollup with $STEPS steps (estimated run time: $((STEPS * 10))s)"
podcli check http database-replica:3306/readyz
i=1
while [ $i -le $STEPS ]; do
echo "Running rollup iteration $i of $STEPS"
sleep 10
i=$((i + 1))
done
echo "Rollup finished"

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: database-primary
spec:
type: ClusterIP
clusterIP: None
selector:
app.kubernetes.io/name: database-primary
ports:
- name: db
port: 3306
protocol: TCP
targetPort: db

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: database-replica
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: database-replica
ports:
- name: db
port: 3306
protocol: TCP
targetPort: db

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: database

View File

@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: database-primary
spec:
serviceName: database-primary
replicas: 1
minReadySeconds: 3
revisionHistoryLimit: 5
selector:
matchLabels:
app.kubernetes.io/name: database-primary
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9797"
labels:
app.kubernetes.io/name: database-primary
app.kubernetes.io/part-of: database
spec:
serviceAccountName: database
containers:
- name: database
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
ports:
- name: db
containerPort: 3306
protocol: TCP
- name: http-metrics
containerPort: 9797
protocol: TCP
command:
- ./podinfo
- --port=3306
- --port-metrics=9797
- --level=info
livenessProbe:
exec:
command:
- podcli
- check
- http
- localhost:3306/healthz
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
exec:
command:
- podcli
- check
- http
- localhost:3306/readyz
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: 2000m
memory: 512Mi
requests:
cpu: 100m
memory: 32Mi
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: database-primary

View File

@@ -12,18 +12,18 @@ spec:
type: RollingUpdate
selector:
matchLabels:
app: frontend
app.kubernetes.io/name: frontend
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9797"
labels:
app: frontend
app.kubernetes.io/name: frontend
spec:
containers:
- name: frontend
image: stefanprodan/podinfo:4.0.5
image: ghcr.io/stefanprodan/podinfo:6.11.2
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -41,7 +41,7 @@ spec:
- --port-metrics=9797
- --level=info
- --backend-url=http://backend:9898/echo
- --cache-server=cache:6379
- --cache-server=tcp://cache:6379
env:
- name: PODINFO_UI_COLOR
value: "#34577c"

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v2beta2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: frontend

View File

@@ -5,7 +5,7 @@ metadata:
spec:
type: ClusterIP
selector:
app: frontend
app.kubernetes.io/name: frontend
ports:
- name: http
port: 80

48
deploy/kind.sh Executable file
View File

@@ -0,0 +1,48 @@
#! /usr/bin/env sh
mkdir -p bin
cat > ./bin/kind.yaml <<EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOF
# create the kind cluster
kind create cluster --config=kind.yaml
# add certificate manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.yaml
# wait for cert manager
kubectl rollout status --namespace cert-manager deployment/cert-manager --timeout=2m
kubectl rollout status --namespace cert-manager deployment/cert-manager-webhook --timeout=2m
kubectl rollout status --namespace cert-manager deployment/cert-manager-cainjector --timeout=2m
# # apply the secure webapp
kubectl apply -f ./secure/common
kubectl apply -f ./secure/backend
kubectl apply -f ./secure/frontend
# # wait for the podinfo frontend to come up
kubectl rollout status --namespace secure deployment/frontend --timeout=1m
# curl the endpoints (responds with info due to header regexp on route handler)
echo
echo "http enpdoint:"
echo "curl http://localhost"
echo
curl http://localhost
echo
echo "https (secure) enpdoint:"
echo "curl --insecure https://localhost"
echo
curl --insecure https://localhost

View File

@@ -5,6 +5,7 @@ resources:
- ../../bases/backend
- ../../bases/frontend
- ../../bases/cache
- ../../bases/database
- namespace.yaml
transformers:
- labels.yaml

View File

@@ -3,8 +3,8 @@ kind: LabelTransformer
metadata:
name: labels
labels:
env: dev
instance: webapp
app.kubernetes.io/environment: dev
app.kubernetes.io/instance: webapp
fieldSpecs:
- path: metadata/labels
create: true

View File

@@ -5,6 +5,7 @@ resources:
- ../../bases/backend
- ../../bases/frontend
- ../../bases/cache
- ../../bases/database
- namespace.yaml
transformers:
- labels.yaml

View File

@@ -3,8 +3,8 @@ kind: LabelTransformer
metadata:
name: labels
labels:
env: production
instance: webapp
app.kubernetes.io/environment: production
app.kubernetes.io/instance: webapp
fieldSpecs:
- path: metadata/labels
create: true

View File

@@ -5,6 +5,7 @@ resources:
- ../../bases/backend
- ../../bases/frontend
- ../../bases/cache
- ../../bases/database
- namespace.yaml
transformers:
- labels.yaml

View File

@@ -3,8 +3,8 @@ kind: LabelTransformer
metadata:
name: labels
labels:
env: staging
instance: webapp
app.kubernetes.io/environment: staging
app.kubernetes.io/instance: webapp
fieldSpecs:
- path: metadata/labels
create: true

View File

@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: secure
spec:
minReadySeconds: 3
revisionHistoryLimit: 5
progressDeadlineSeconds: 60
strategy:
rollingUpdate:
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: backend
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9797"
labels:
app: backend
spec:
serviceAccountName: secure
containers:
- name: backend
image: ghcr.io/stefanprodan/podinfo:5.0.3
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 9898
protocol: TCP
- name: http-metrics
containerPort: 9797
protocol: TCP
- name: grpc
containerPort: 9999
protocol: TCP
command:
- ./podinfo
- --port=9898
- --port-metrics=9797
- --grpc-port=9999
- --grpc-service-name=backend
- --level=info
env:
- name: PODINFO_UI_COLOR
value: "#34577c"
livenessProbe:
exec:
command:
- podcli
- check
- http
- localhost:9898/healthz
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
exec:
command:
- podcli
- check
- http
- localhost:9898/readyz
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: 2000m
memory: 512Mi
requests:
cpu: 100m
memory: 32Mi

View File

@@ -0,0 +1,19 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: backend
namespace: secure
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: backend
minReplicas: 1
maxReplicas: 2
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 99

View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: backend
namespace: secure
spec:
type: ClusterIP
selector:
app: backend
ports:
- name: http
port: 9898
protocol: TCP
targetPort: http
- port: 9999
targetPort: grpc
protocol: TCP
name: grpc

View File

@@ -0,0 +1,6 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: self-signed
spec:
selfSigned: {}

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: secure

View File

@@ -0,0 +1,29 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: reconciler
namespace: secure
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: reconciler
namespace: secure
rules:
- apiGroups: ['*']
resources: ['*']
verbs: ['*']
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: reconciler
namespace: secure
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: reconciler
subjects:
- kind: ServiceAccount
name: reconciler
namespace: secure

Some files were not shown because too many files have changed in this diff Show More