Compare commits

...

554 Commits

Author SHA1 Message Date
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
Stefan Prodan
f43f9b2eb6 Merge pull request #87 from stefanprodan/release-4.0.5
Release v4.0.5
2020-06-15 10:34:21 +03:00
stefanprodan
9a46ed3182 Release v4.0.5 2020-06-15 09:56:10 +03:00
Stefan Prodan
82b7007c5d Merge pull request #86 from stefanprodan/redis-chart
Add Redis deployment to Helm chart
2020-06-15 09:54:44 +03:00
stefanprodan
806f0dbe82 Add Redis deployment to Helm chart 2020-06-14 15:35:34 +03:00
Stefan Prodan
936018e5bb Merge pull request #85 from stefanprodan/alpine-3.12
Update Alpine to 3.12
2020-06-12 16:55:54 +03:00
stefanprodan
1b4131b5ad Update Alpine to 3.12 2020-06-12 13:49:06 +03:00
Stefan Prodan
b98a9dcc1a Merge pull request #84 from stefanprodan/release-4.0.4
Release v4.0.4
2020-06-12 13:46:58 +03:00
stefanprodan
8860e57362 Release v4.0.4 2020-06-12 13:40:07 +03:00
Stefan Prodan
f1ecea6b53 Merge pull request #83 from stefanprodan/pod-annotations
Add pod annotations to chart options
2020-06-12 13:33:31 +03:00
stefanprodan
ebc6493990 Add pod annotations to chart options 2020-06-12 13:00:54 +03:00
Stefan Prodan
a2f9216fe4 Merge pull request #82 from stefanprodan/release-4.0.3
Release v4.0.3
2020-06-06 13:31:28 +03:00
stefanprodan
27436ed538 Release v4.0.3 2020-06-06 09:55:21 +03:00
Stefan Prodan
c103a50423 Merge pull request #81 from alaa/master
Enable gRPC reflection protocol
2020-06-06 09:01:24 +03:00
Alaa Qutaish
5ac16f0f98 Enable gRPC reflection protocol 2020-06-05 17:16:29 +02:00
Stefan Prodan
b4138fdb4d Merge pull request #80 from stefanprodan/release-4.0.2
Release v4.0.2
2020-05-29 13:50:31 +03:00
stefanprodan
a2e6fd0ef1 Release v4.0.2 2020-05-29 13:24:11 +03:00
Stefan Prodan
c2aaf7a962 Merge pull request #79 from stefanprodan/cve-scan
Add CVE scanning with trivy
2020-05-29 12:46:07 +03:00
stefanprodan
a066ff5385 Add CVE scanning with trivy 2020-05-29 12:39:55 +03:00
Stefan Prodan
113360052b Merge pull request #78 from stefanprodan/release-4.0.1
Release 4.0.1
2020-05-28 10:46:58 +03:00
stefanprodan
a24e3e539c Release 4.0.1 2020-05-28 10:41:56 +03:00
Stefan Prodan
ed8a14d4d9 Merge pull request #77 from stefanprodan/e2e-helm
Consolidate e2e and unit tests
2020-05-28 10:36:37 +03:00
stefanprodan
d2798e1a24 Consolidate tests 2020-05-28 10:21:50 +03:00
stefanprodan
369014455c Use helm-gh-pages action 2020-05-28 10:13:45 +03:00
Stefan Prodan
db1b8a7acd Merge pull request #76 from seaneagan/helm2_tests
Add end-to-end tests for Helm v2 and v3
2020-05-28 10:11:45 +03:00
Sean Eagan
cc9231ae10 Test for helm 2 support 2020-05-27 15:59:38 -05:00
Sean Eagan
03ba47a0be helm tests: Helm 2 support
The `test-success` hook is supported by Helm 2 and 3.
2020-05-27 11:34:56 -05:00
Stefan Prodan
ab953493ee Merge pull request #74 from stefanprodan/release-4.0.0
Release 4.0.0
2020-05-27 18:28:14 +03:00
stefanprodan
c04ee365e6 Release 4.0.0 2020-05-27 18:14:55 +03:00
Stefan Prodan
26e8935520 Merge pull request #73 from stefanprodan/gh-actions-e2e
Migrate CI to GitHub Actions
2020-05-27 18:13:19 +03:00
stefanprodan
dd027359e6 Add goreleaser to release workflow 2020-05-27 17:56:18 +03:00
stefanprodan
cf26a9cefc Remove CircleCI e2e tests 2020-05-27 17:30:57 +03:00
stefanprodan
026b40876c Add linting workflow 2020-05-27 17:18:54 +03:00
stefanprodan
fd1814052a Add opencontainers metadata 2020-05-27 17:02:23 +03:00
stefanprodan
98c2853ec3 Publish Helm chart on release 2020-05-27 16:45:07 +03:00
stefanprodan
b2ca15b8af Add Helm publish action 2020-05-27 16:26:08 +03:00
stefanprodan
55e7178dad Refactor Helm action 2020-05-27 13:06:54 +03:00
stefanprodan
ea55d3facf Run end-to-end tests with Github Actions 2020-05-22 11:49:04 +03:00
stefanprodan
a72aa7a184 Remove ngrok chart 2020-05-22 10:45:22 +03:00
Stefan Prodan
b4248cae1e Merge pull request #72 from stefanprodan/multi-arch-build
Push releases to Docker Hub for AMD64, ARM64 and ARM v6/v7
2020-05-21 12:59:40 +03:00
stefanprodan
7d2bc4905a Push releases to Docker Hub for ARM64 and ARM v6/v7 2020-05-20 17:35:38 +03:00
stefanprodan
f75f6e9fbc Publish multi-arch image with Docker buildx 2020-05-20 15:56:11 +03:00
Stefan Prodan
713d1094a2 Merge pull request #71 from stefanprodan/register-instance
Register hostname and version in cache
2020-05-20 13:57:19 +03:00
stefanprodan
3197ad3e45 Register hostname and version in cache
If the caching server is online, podinfo registers its hostname and version in Redis. The set expires after one minute and it's refreshed every 30 seconds.
2020-05-20 13:51:07 +03:00
Stefan Prodan
92f415d633 Merge pull request #70 from stefanprodan/redis-cache-api
Add cache CRUD API
2020-05-20 13:15:03 +03:00
stefanprodan
0352a3c822 Add Helm test for the cache routes 2020-05-20 13:05:50 +03:00
stefanprodan
5ba5808722 Add cache CRUD API 2020-05-20 12:59:27 +03:00
Stefan Prodan
1d416a8513 Merge pull request #69 from seaneagan/helm2and3tests
Reverts tests as Jobs
2020-05-20 12:04:19 +03:00
Sean Eagan
95028a0fb0 Reverts tests as Jobs
This reverts the #61 change to use test Jobs, which was premature
since this feature hasn't been back ported to Helm 2 yet, which
leads to the tests not being run there.

It would be possible to use presence of .Capabilities.TillerVersion
to implement tests differently for Helm 2 vs 3, but this seems
not worth the trouble.
2020-05-19 15:27:08 -05:00
Stefan Prodan
b45cc75329 Merge pull request #67 from stefanprodan/release-3.3.1
Release v3.3.1
2020-05-16 11:46:00 +03:00
stefanprodan
79bbf76ece Release v3.3.1 2020-05-16 11:01:21 +03:00
Stefan Prodan
a8c7300174 Merge pull request #66 from stefanprodan/linkerd-profile-update
Add cache routes to Linkerd profile
2020-05-16 10:58:26 +03:00
stefanprodan
a60f28ac2f Update Kubernetes Kind to v0.8.1 2020-05-16 10:16:49 +03:00
stefanprodan
adba061f77 Update ingress API version 2020-05-16 10:15:36 +03:00
stefanprodan
8f15e4e00a Fix Helm tests 2020-05-16 10:14:45 +03:00
stefanprodan
07db5a6583 Add cache routes to Linkerd profile 2020-05-16 10:14:22 +03:00
Stefan Prodan
3e6d61e77e Merge pull request #65 from stefanprodan/release-3.3.0
Release v3.3.0
2020-05-16 10:07:12 +03:00
stefanprodan
c7c7d699c9 Release v3.3.0 2020-05-16 10:00:51 +03:00
Stefan Prodan
067751c67d Merge pull request #64 from stefanprodan/cache-api
Add cache API
2020-05-16 09:59:19 +03:00
stefanprodan
73b658d711 Add cache API
- implement cache with Redis
- add cache-server to args and config
- add Redis deployment to webapp overlays
2020-05-16 09:53:17 +03:00
Stefan Prodan
e5516b38cb Merge pull request #63 from stefanprodan/release-3.2.4
Release v3.2.4
2020-05-15 13:17:35 +03:00
stefanprodan
39130004d5 Release v3.2.4 2020-05-15 13:02:08 +03:00
Stefan Prodan
d4b615e3a2 Merge pull request #62 from stefanprodan/base-image
Push base image to Docker Hub
2020-05-15 13:00:18 +03:00
stefanprodan
98e133a7be Push base image to Docker Hub 2020-05-15 12:49:22 +03:00
Stefan Prodan
7674b76dab Merge pull request #60 from seaneagan/helm_test_fault
Support simulating helm test failure and timeout
2020-05-14 23:57:16 +03:00
Stefan Prodan
8fa39d90be Merge pull request #61 from seaneagan/helm3_tests_should_be_jobs
Helm 3 tests should be Jobs
2020-05-14 22:35:33 +03:00
Sean Eagan
638bdc8e83 Helm 3 tests should be Jobs
Without this "helm.sh/hook-delete-policy": before-hook-creation" does not work.
2020-05-14 09:12:53 -05:00
Sean Eagan
b565a67dec Support simulating helm test failure and timeout
This is to support testing of https://github.com/fluxcd/helm-operator/issues/369.
2020-05-13 14:22:24 -05:00
stefanprodan
65d077291b Add reconciler RBAC to webapp manifests 2020-05-01 20:29:55 +03:00
Stefan Prodan
e9d11c247e Merge pull request #58 from ytsarev/quote-message
Quote ui message in deployment template
2020-04-30 23:23:27 +03:00
Yury Tsarev
126ac55801 Quote ui message in deployment template
* To handle rare situation of digit-only message like 270 and
avoid associated failure during helm install
```
ReadString: expects " or n, but found 2, error found in #10 byte of ...|,"value":270},
{"name|..., bigger context ...|se"],"env":[{"name":"PODINFO_UI_MESSAGE","value":270},
```
2020-04-30 21:47:49 +02:00
Stefan Prodan
306aac3e65 Merge pull request #57 from stefanprodan/release-3.2.3
Release v3.2.3
2020-04-29 00:23:16 +03:00
stefanprodan
55318b0c20 Release v3.2.3 2020-04-28 19:20:23 +03:00
Stefan Prodan
1865faf7ce Merge pull request #56 from stefanprodan/webapp-demo
Add webapp demo
2020-04-28 19:18:28 +03:00
stefanprodan
9edd7abbe8 Include webapp demo in release 2020-04-28 19:13:01 +03:00
stefanprodan
1c4acc0b33 Add webapp demo kustomizations 2020-04-28 19:12:44 +03:00
stefanprodan
6274f16b9b Add webapp demo manifests 2020-04-28 19:12:25 +03:00
stefanprodan
93e338a964 Add app common label to kustomization 2020-04-15 12:22:49 +03:00
Stefan Prodan
73b03b77fc Merge pull request #54 from hiddeco/chart/readme-fix
chart: align README with actual values file
2020-04-04 13:36:58 +03:00
Hidde Beydals
0135757fbd chart: remove redundant codeblock opening 2020-04-04 12:32:54 +02:00
Hidde Beydals
ea1fe87d49 chart: align README with actual values file 2020-04-04 12:31:01 +02:00
Stefan Prodan
363a6a8fe6 Merge pull request #53 from stefanprodan/prep-3.2.2
Release v3.2.2
2020-04-02 17:16:13 +03:00
stefanprodan
8491738c8a Release v3.2.2 2020-04-02 17:10:40 +03:00
Stefan Prodan
361179fad9 Merge pull request #52 from stefanprodan/prometheus-operator
chart: add Prometheus Operator service monitor
2020-04-02 17:05:58 +03:00
stefanprodan
13eb7c42cd chart: add Prometheus Operator service monitor 2020-04-02 16:58:46 +03:00
stefanprodan
e4ecd98b83 chart: change label selectors to full name 2020-04-02 16:48:07 +03:00
Stefan Prodan
5e747d3e08 Merge pull request #50 from stefanprodan/prep-3.2.1
Release v3.2.1
2020-03-24 13:54:46 +02:00
stefanprodan
c6425ac1f8 Release v3.2.1 2020-03-24 13:40:21 +02:00
stefanprodan
7f5b8817ca e2e: ignore logs error 2020-03-24 13:39:10 +02:00
Stefan Prodan
fb999f828f Merge pull request #49 from stefanprodan/go-upgrade
Update go and alpine
2020-03-24 13:33:26 +02:00
stefanprodan
ba12154f68 Format imports 2020-03-24 13:03:51 +02:00
stefanprodan
73e0ee798f Update CI to go 1.14 2020-03-24 12:57:55 +02:00
stefanprodan
2c7029cf35 Update go and alpine
- update go to 1.14
- update alpine to 3.11
- update packages
2020-03-24 12:50:15 +02:00
Stefan Prodan
50c35833dc Merge pull request #48 from stefanprodan/fix-background
Fix background colour
2020-03-24 12:21:26 +02:00
stefanprodan
7a8b7d6a5c Fix background colour 2020-03-24 12:15:09 +02:00
Stefan Prodan
2a36e84bf2 Merge pull request #46 from sebastianortizs4n/feature/support_helm3_test_hooks
Feature/support helm3 test hooks
2020-02-09 23:46:03 +02:00
Sebastián Ortiz Vásquez
3802fb427a Updated helm test, helm3 does not have --cleanup 2020-01-27 14:59:11 -05:00
Sebastián Ortiz Vásquez
b4ea2afc19 Updated test hook, and hook deleting policy for test pods 2020-01-27 14:57:09 -05:00
stefanprodan
6ba7ddc83f Update GitOps guides
- add Helm v3 and Linkerd hands-on workshop
- add AWS blog posts on autoscaling and ingress
- add EKS hands-on workshop
2020-01-24 13:44:38 +02:00
Stefan Prodan
af6868a8de Merge pull request #45 from stefanprodan/prep-3.2.0
Release v3.2.0
2020-01-24 11:26:03 +02:00
stefanprodan
910e7139f9 Release v3.2.0 2020-01-24 11:06:02 +02:00
Stefan Prodan
fe65869b6b Merge pull request #43 from stefanprodan/helm-v3-e2e
e2e: Update Helm to v3 and Kubernetes to v1.17
2020-01-24 11:02:58 +02:00
Stefan Prodan
2a319d9d0d Merge pull request #44 from hiddeco/unhealthy-unready
Add `--unhealthy` and `--unready` flags
2020-01-23 22:42:29 +02:00
Hidde Beydals
48402eff7e Add --unhealthy and --unready flags to chart 2020-01-23 21:06:30 +01:00
Hidde Beydals
15600cc7d3 Lowercase all flag descriptions 2020-01-23 21:06:30 +01:00
Hidde Beydals
ed2a774e10 Add --unhealthy and --unready flags
Depending on the flag set, the healthy or ready state is never
reached.
2020-01-23 21:06:22 +01:00
stefanprodan
1d590c07cb e2e: Update Helm to v3 and Kubernetes to v1.17 2020-01-22 13:16:03 +02:00
stefanprodan
948de81ed3 Update manifests to v3.1.5 2019-12-26 15:45:17 +02:00
stefanprodan
78658c0311 Release v3.1.5 cuddle edition 2019-11-07 00:31:49 +02:00
stefanprodan
7b6f11780a Rename GitHub workflow for kustomize testing 2019-11-04 09:59:11 +02:00
stefanprodan
d65044ff2e Release v3.1.4 2019-11-04 09:22:36 +02:00
Stefan Prodan
18c63ad7f7 Merge pull request #42 from mumoshu/h2c
feat: Add H2C support
2019-11-04 09:16:12 +02:00
Yusuke Kuoka
a8260081d9 Add h2c.enabled to chart for toggling H2C upgrading support 2019-11-04 14:17:10 +09:00
Yusuke Kuoka
0ff49e5057 feat: Add H2C support
`podinfo --h2c` allows upgrading a HTTP/1.1 connection to HTTP/2 Cleartext.

This allows `podinfo` to be used in e.g. a H2C load-test like `echo "GET http://localhost:9898/status/200" | vegeta -h2c`, or a H2C connectivity test like done with `curl -v http2 http://localhost:9898/status/200`.

I have manually verified this to work by running `curl -v --http2` on macOS and seeing the H2C upgrade happens onl when `-h2c` is provided to `podinfo`.

Without `-h2c`:

```
$ curl -v --http2 localhost:9898/status/200
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0)
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Mon, 04 Nov 2019 04:58:01 GMT
< Content-Length: 19
<
{
  "status": 200
* Connection #0 to host localhost left intact
}
```

With `-h2c`:

```
$ curl -v --http2 localhost:9898/status/200
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0)
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 101 Switching Protocols
< Connection: Upgrade
< Upgrade: h2c
* Received 101
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< content-type: application/json; charset=utf-8
< x-content-type-options: nosniff
< content-length: 19
< date: Mon, 04 Nov 2019 04:58:28 GMT
<
{
  "status": 200
* Connection #0 to host localhost left intact
}
`
2019-11-04 14:10:50 +09:00
Stefan Prodan
79cfe56484 Merge pull request #41 from stefanprodan/gh-actions
Add GitHub workflow for manifests validation
2019-10-23 17:35:53 +03:00
stefanprodan
7e36892e26 Add GitHub workflow for manifests validation
- validate kustomize build with kubeval strict mode
- deny containers with latest image tag
- deny deployments and services without app label selector
- warn if deployments have no prometheus pod annotations
2019-10-23 17:10:21 +03:00
Stefan Prodan
3d6d0bed69 Merge pull request #40 from stefanprodan/linkerd-profile
Add Linkerd service profile to Helm chart
2019-10-17 13:56:39 +03:00
stefanprodan
b213e0af0a Release v3.1.3 2019-10-17 13:50:48 +03:00
stefanprodan
42ad3faf5a Add Linkerd service profile to chart 2019-10-17 13:47:44 +03:00
stefanprodan
939fd5b24d Add Go report card 2019-10-17 13:35:54 +03:00
stefanprodan
36ec3ef378 Fix UI parallax img 2019-10-13 09:52:33 +03:00
Stefan Prodan
287e005129 Merge pull request #39 from stefanprodan/ui-logo
Make UI logo URL configurable
2019-10-12 18:10:40 +03:00
stefanprodan
0b3e88d6de Add release namespace to Helm tests 2019-10-12 18:00:14 +03:00
stefanprodan
10139749da Turn off CircleCI docker_layer_caching 2019-10-12 17:50:12 +03:00
stefanprodan
f891e0683b Release v3.1.2 2019-10-12 17:45:54 +03:00
stefanprodan
647b4cba04 Add UI settings to Helm chart 2019-10-12 17:44:37 +03:00
stefanprodan
c5df50c774 Make UI logo URL configurable 2019-10-12 17:41:21 +03:00
Stefan Prodan
2b1d325343 Merge pull request #38 from stefanprodan/go1.13
Update to go 1.13
2019-09-27 17:43:52 +03:00
stefanprodan
319d57cb68 Update to go 1.13 2019-09-27 17:04:39 +03:00
Stefan Prodan
087da02dbb Merge pull request #37 from stefanprodan/chart-fixes
Fix Helm tests when running inside a service mesh
2019-09-27 16:18:46 +03:00
stefanprodan
7d00f68180 Bump version to 3.1.1 2019-09-27 16:10:22 +03:00
stefanprodan
87c9bb8ba2 Exclude Helm test pods for service mesh 2019-09-27 16:09:24 +03:00
Stefan Prodan
5fb970b526 Merge pull request #36 from stefanprodan/backends
Add support for multiple backends
2019-09-27 12:16:28 +03:00
stefanprodan
56b404bd84 Release v3.1.0 2019-09-27 12:10:29 +03:00
stefanprodan
a12d0a1ed7 Add support for multiple backends
When calling /echo, the backends requests will be run in parallel and the results are aggregated and returned to the caller as a json array
2019-09-27 11:52:22 +03:00
Stefan Prodan
51979787b0 Fix Helm repo address 2019-09-26 12:29:49 +03:00
Stefan Prodan
8b37756118 Merge pull request #35 from eladb/patch-1
remove duplicate "ingress" entries in readme
2019-09-14 09:20:06 +02:00
Elad Ben-Israel
1eb1da110b remove duplicate "ingress" entries in readme 2019-09-11 14:10:06 +03:00
stefanprodan
d1ed907f1e Make tests work with Helm v3 2019-09-05 20:53:20 +03:00
stefanprodan
8e6eccecda Fix chart for old Helm versions 2019-09-05 16:01:34 +03:00
Stefan Prodan
f3db1adb27 Merge pull request #34 from stefanprodan/ingress-fix
Allow ingress with no hosts set
2019-09-05 14:48:49 +03:00
stefanprodan
7f3e11c1ce Allow ingress with no hosts set 2019-09-05 14:42:36 +03:00
Stefan Prodan
a7eb7e4995 Merge pull request #33 from stefanprodan/prep-3.0.0
Release v3.0.0
2019-09-05 12:23:02 +03:00
stefanprodan
43194bb342 Release v3.0.0 2019-09-05 12:14:18 +03:00
Stefan Prodan
c7d21968e7 Merge pull request #32 from stefanprodan/gprc-health
Implement gRPC health endpoint
2019-09-05 11:43:13 +03:00
stefanprodan
214a19fb0f Add gRPC service name flag to check command 2019-09-05 09:41:02 +03:00
stefanprodan
82ea2fa993 Update Kubernetes Kind to v0.5.1 2019-09-05 09:29:51 +03:00
stefanprodan
d84913c31e Add gPRC Helm test 2019-09-05 09:22:49 +03:00
stefanprodan
6bac5ffaa2 Add gPRC port and service name to chart 2019-09-05 01:08:26 +03:00
stefanprodan
eacf909c4a Add gPRC health check to CLI 2019-09-05 00:29:09 +03:00
stefanprodan
f7c1669125 Run gPRC health server if grpc-port flag is set 2019-09-05 00:28:32 +03:00
stefanprodan
158d6e82da Add gRPC health server 2019-09-05 00:20:28 +03:00
Stefan Prodan
4d890382e5 Merge pull request #30 from stefanprodan/service-account
Add service account to Helm chart
2019-08-13 12:30:04 +03:00
stefanprodan
83842e01f7 Rename service account create to enabled 2019-08-13 12:12:52 +03:00
stefanprodan
37b453fbbc Release v2.1.3 2019-08-13 12:08:50 +03:00
stefanprodan
53c6b472de Fix ClusterIP creation 2019-08-13 12:02:32 +03:00
stefanprodan
c759f958c0 e2e: print logs after tests finished 2019-08-13 11:53:28 +03:00
stefanprodan
5d14183809 Add service account to Helm chart 2019-08-13 11:37:10 +03:00
stefanprodan
ab74d6ef0b Release v2.1.2
Make the ClusterIP service optional in helm chart (should be disabled when using Flagger)
2019-08-13 10:50:03 +03:00
stefanprodan
fefcae34c1 Rename test config 2019-08-09 18:00:41 +03:00
stefanprodan
ed81a06a82 Release v2.1.1
Use Docker Hub instead of Quay
2019-08-09 17:53:15 +03:00
stefanprodan
633982b0e5 Use Docker Hub repo 2019-08-09 17:21:19 +03:00
Stefan Prodan
4154e01fdd Merge pull request #29 from stefanprodan/swagger
Implement Swagger support
2019-08-07 16:01:15 +03:00
stefanprodan
02d7f06d35 Release 2.1.0 2019-08-07 15:54:03 +03:00
stefanprodan
555450868e Move Swagger doc to server.go 2019-08-07 15:22:05 +03:00
stefanprodan
94085d6dc6 Add schemes to Swagger docs 2019-08-07 15:17:34 +03:00
stefanprodan
630841d81b Push latest tag to Docker Hub and Quay 2019-08-07 15:01:58 +03:00
stefanprodan
ea7f4fcdf7 Add the swagger UI link to docs 2019-08-07 14:54:47 +03:00
stefanprodan
e97c926611 Add license to swagger docs 2019-08-07 14:54:33 +03:00
stefanprodan
2479134e78 Implement swagger support
- add swagger definitions for all API routes
- self-host the swagger UI on `/swagger/`
- serve swagger spec on `/swagger.json`
2019-08-07 14:17:35 +03:00
Stefan Prodan
b0bbd16a77 Merge pull request #28 from stefanprodan/prep-2.0.2
Release v2.0.2
2019-08-06 22:58:51 +03:00
stefanprodan
7564949695 Add e2e docs 2019-08-06 22:53:20 +03:00
stefanprodan
d34da2ab91 Release v2.0.2 2019-08-06 22:15:19 +03:00
stefanprodan
182156d9b4 Add build step to e2e tests 2019-08-06 22:13:19 +03:00
Stefan Prodan
e0864b6e20 Merge pull request #27 from stefanprodan/ci
Migrate to CircleCI and run e2e tests with Kubernetes Kind
2019-08-06 21:59:13 +03:00
stefanprodan
de2a9c464a Release v2.0.1 2019-08-06 21:53:16 +03:00
stefanprodan
fed04ad692 Add e2e testing with Kubernetes Kind and Helm 2019-08-06 21:36:25 +03:00
stefanprodan
c907163073 Add JWT test to helm chart 2019-08-06 21:08:54 +03:00
stefanprodan
67578338c9 Toggle timeline background based on version 2019-08-06 20:46:17 +03:00
stefanprodan
0c27729000 Migrate CI to CircleCI 2019-08-06 20:36:57 +03:00
Stefan Prodan
dc27269a47 Merge pull request #26 from stefanprodan/prep-v2.0.0
Release v2.0.0
2019-08-06 17:17:45 +03:00
stefanprodan
eeb1d2b674 Publish podinfo CLI to GitHub releases 2019-08-06 17:03:09 +03:00
stefanprodan
6da79daa96 Add release command 2019-08-06 16:58:35 +03:00
stefanprodan
34aef54f20 Release v2 2019-08-06 16:53:38 +03:00
stefanprodan
dc96b15dac Add badges 2019-08-06 16:53:02 +03:00
stefanprodan
64ff737dca Add CircleCI release workflow 2019-08-06 16:44:05 +03:00
Stefan Prodan
3c76b54c80 Merge pull request #25 from stefanprodan/v2
Prepare v2 release
2019-08-06 16:41:11 +03:00
stefanprodan
fc5a9797e8 Add guides to readme 2019-08-06 16:33:20 +03:00
stefanprodan
fb183d897b Publish Helm chart to GH Pages 2019-08-06 16:14:07 +03:00
stefanprodan
67711cf150 Add Kustomize and Helm install to readme 2019-08-06 15:59:58 +03:00
stefanprodan
0ca7c25d68 Set version with make 2019-08-06 15:59:39 +03:00
stefanprodan
eb0ad32655 Add Kustomize installer 2019-08-06 15:59:03 +03:00
stefanprodan
f9ce51da4b Push container on release 2019-08-06 15:32:37 +03:00
stefanprodan
045246c324 Cleanup make 2019-08-06 15:06:27 +03:00
stefanprodan
9bd14c1ba7 Use go proxy and modules 2019-08-06 15:06:16 +03:00
stefanprodan
6f59e98bec Add timeline to UI 2019-08-06 15:05:37 +03:00
stefanprodan
c287ab7daf Rename imports and use go modules 2019-08-06 15:05:15 +03:00
stefanprodan
e2efee0bdf Remove docs and build dirs 2019-08-06 12:14:09 +03:00
stefanprodan
6c8a85a5ab Release v1.8.0 2019-08-05 10:00:23 +03:00
Stefan Prodan
c9dc78f29c Merge pull request #22 from imduffy15/master
Add delayed chunk endpoint
2019-08-05 09:20:27 +03:00
Ian Duffy
6a9b0253ac Update README.md 2019-08-04 10:06:20 +01:00
Ian Duffy
198211e20b Add delayed chunk endpoint
Adds an endpoint that does chunk based encoding. The endpoint just stalls
and eventually returns the stall time.

Similar to the delay endpoint but in a chunked maner.

Fixed up the metrics interceptor to wrap ResponseWriter correctly too.
2019-08-04 00:34:12 +01:00
stefanprodan
e1ca9e227d Remove the middle htlm section 2019-07-26 01:15:47 +03:00
stefanprodan
4fc593f42c Bump version to 1.7.1 2019-07-26 01:02:01 +03:00
stefanprodan
18af1ea3a6 Merge remote-tracking branch 'origin/master' 2019-07-26 00:53:35 +03:00
stefanprodan
2e9917a6b9 Bump version to 1.7.0 2019-07-26 00:53:22 +03:00
Stefan Prodan
bf00d07b17 Merge pull request #20 from grampelberg/master
Upgrade to vuetify 2.x
2019-07-26 00:45:06 +03:00
grampelberg
aab8e464e8 Upgrade to vuetify 2.x 2019-07-25 13:31:12 -07:00
stefanprodan
1475a2da00 Release charts 2019-06-15 18:33:10 +03:00
Stefan Prodan
44f588dd4c Merge pull request #19 from stefanprodan/metrics-port
Add option to run the metrics exporter on a different port
2019-06-15 17:14:01 +03:00
stefanprodan
951d82abb9 Add option to run the metrics exporter on a different port
Add port-metrics flag, when specified the Prometheus /metrics endpoint will be exposed on that port.
2019-06-15 17:07:34 +03:00
Stefan Prodan
3301f6f8d4 Merge pull request #18 from stefanprodan/fix-helm-test
Fix storage tests
2019-04-19 12:45:53 +03:00
stefanprodan
0339d3beb0 Fix storage tests 2019-04-19 12:44:58 +03:00
Stefan Prodan
d1b77c97b8 Merge pull request #17 from mumoshu/patch-1
fix(doc): Update README about read/write endpoints
2019-04-19 11:02:02 +03:00
KUOKA Yusuke
bfa3aaf9ac fix(doc): Update README about read/write endpoints
I was following https://github.com/stefanprodan/k8s-podinfo/blob/master/docs/1-deploy.md#using-the-helm-chart and `helm test` failed.

The cause seemed like changes in two endpoints. `POST /write` seems to have changed to `POST /store`, and `GET /read/{hash}` to `GET /store/{hash}`. Here's the fix according to my observation :)
2019-04-19 16:39:09 +09:00
stefanprodan
43df2d19c6 Bump version to 1.5.1 2019-03-25 12:16:20 +02:00
stefanprodan
7181351c89 Bump version to 1.5.0 2019-03-25 12:08:37 +02:00
Stefan Prodan
1c3bf10de2 Merge pull request #16 from luxas/ui-pathprefix
Fix the UI XHRs when the webserver is mounted at a non-root URL
2019-03-25 11:28:51 +02:00
Lucas Käldström
c28c11d4a5 Release v1.4.4 2019-03-25 11:22:38 +02:00
Lucas Käldström
5c2f9a19d6 Make the UI perform XHRs relative to its own path 2019-03-25 11:21:33 +02:00
Stefan Prodan
7d5200a78a Merge pull request #15 from stefanprodan/fix-port
Add port validation
2019-03-21 21:06:10 +02:00
stefanprodan
66b8948473 Bump version to 1.4.3 2019-03-21 20:57:07 +02:00
stefanprodan
db04ce117b Add port validation 2019-03-21 20:43:02 +02:00
stefanprodan
5142c39a8e Add arm64 and amd64 Drone pipelines 2019-02-08 01:07:15 +02:00
stefanprodan
001486ac0a Push ARMv7 image with Drone 2019-02-08 00:43:53 +02:00
stefanprodan
ed553135b2 Set Drone platform to arm 2019-02-08 00:32:15 +02:00
stefanprodan
c21c24b2fd Build master with Drone 2019-02-08 00:25:55 +02:00
stefanprodan
4dbbfa9239 Rename Drone pipeline 2019-02-08 00:12:04 +02:00
stefanprodan
bc8ff9b412 Build ARM image with Drone on Scaleway 2019-02-08 00:06:23 +02:00
stefanprodan
cdf9b06b86 Upgrade golang GitHub action to 1.11 2018-12-20 17:52:56 +02:00
stefanprodan
431ab9e19e Disable Travis Kubernetes in Docker (kind) 2018-12-20 15:57:09 +02:00
stefanprodan
1273d3745e Run podinfo local image on Travis Kubernetes in Docker 2018-12-20 15:36:58 +02:00
stefanprodan
caa49b96aa Run podinfo on Travis Kubernetes in Docker 2018-12-20 15:22:06 +02:00
stefanprodan
319e444ddf Fix kubectl perm for Travis Kubernetes in Docker 2018-12-20 15:12:39 +02:00
stefanprodan
0529fff9aa Test Travis Kubernetes in Docker 2018-12-20 15:07:58 +02:00
stefanprodan
0fc239aaca Test Kubernetes in Docker 2018-12-20 14:56:21 +02:00
stefanprodan
f0b19b63e9 Add sem ver release to TravisCI docs 2018-12-20 10:22:49 +02:00
stefanprodan
d10ba4ac43 Release 1.4.2 2018-12-20 09:57:19 +02:00
stefanprodan
7a2dca6798 Add TravisCI and Quay docs 2018-12-20 09:56:17 +02:00
stefanprodan
62ccb1b67e run go 1.11 fmt 2018-12-20 09:41:08 +02:00
stefanprodan
579284c775 Bootstrap travis in podcli code init 2018-12-20 09:33:55 +02:00
Stefan Prodan
a4948e16dd Remove labels and update deployment to API apps/v1 2018-12-04 16:26:44 +07:00
Stefan Prodan
995dcb5042 Publish chart v1.4.1
- set probes timeout to 5s (fix for GKE containerd)
2018-12-04 16:15:56 +07:00
stefanprodan
cbf1d671df Bump version to 1.4.1 2018-11-28 12:11:18 +02:00
stefanprodan
f6987a0a09 Publish v1.4 Helm chart 2018-11-28 12:01:05 +02:00
Stefan Prodan
ea93f3ed9f Bump version to 1.4.0 2018-11-28 11:45:41 +02:00
Stefan Prodan
2fc253a7c7 Merge pull request #8 from guyfedwards/blue-green-flagger
Set background colour based on version
2018-11-28 11:37:03 +02:00
guyfedwards
c83e19a217 set color based on primary/canary workload
sets the bg color as blue for primary and green for canary workloads
2018-11-27 17:41:41 +00:00
Stefan Prodan
a9a1252a22 Add brew install cmd for podcli 2018-11-07 14:58:37 +02:00
Stefan Prodan
046a9a4852 Add version to code init commit message 2018-10-27 12:19:54 +03:00
Stefan Prodan
4d78abdad8 Prep for v1.3.2 release 2018-10-27 12:19:15 +03:00
Stefan Prodan
f8b32fa130 Release ngrok helm chart v0.2.0 2018-10-27 12:02:46 +03:00
Stefan Prodan
a30fb535de Merge pull request #7 from tdickman/subdomain-support
Add ngrok subdomain support
2018-10-27 12:00:12 +03:00
Stefan Prodan
8d662334a2 Update GitHub actions docs 2018-10-27 11:59:24 +03:00
Tom Dickman
bd31f8b23e Add ngrok subdomain support 2018-10-26 14:06:37 -05:00
1484 changed files with 34910 additions and 364409 deletions

View File

@@ -1,38 +0,0 @@
version: 2
jobs:
build:
docker:
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
steps:
- checkout
- setup_remote_docker: {docker_layer_caching: true}
- run:
name: Run unit tests and build the image with Skaffold
command: skaffold build --profile=test
deploy:
docker:
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
steps:
- checkout
- setup_remote_docker: {docker_layer_caching: true}
- run:
name: Build and push the image to the registry with Skaffold
command: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ "${CIRCLE_PROJECT_USERNAME}" = "stefanprodan" ]] ; then
echo $REGISTRY_PASSWORD | docker login --username $REGISTRY_USERNAME --password-stdin
skaffold build --profile=production
else
echo "Do not push image"
fi
workflows:
version: 2
main:
jobs:
- build
- deploy:
requires: [build]
filters:
branches: {only: [master]}

39
.cosign/README.md Normal file
View File

@@ -0,0 +1,39 @@
# Podinfo signed releases
Podinfo deployment manifests are published to GitHub Container Registry as OCI artifacts
and are signed using [cosign](https://github.com/sigstore/cosign).
## Verify the artifacts with cosign
Install the [cosign](https://github.com/sigstore/cosign) CLI:
```sh
brew install sigstore/tap/cosign
```
Verify a podinfo release with cosign CLI:
```sh
cosign verify -key https://raw.githubusercontent.com/stefanprodan/podinfo/master/cosign/cosign.pub \
ghcr.io/stefanprodan/podinfo-deploy:latest
```
## Download the artifacts with crane
Install the [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) CLI:
```sh
brew install crane
```
Download the podinfo deployment manifests with crane CLI:
```console
$ crane export ghcr.io/stefanprodan/podinfo-deploy:latest -| tar -xf -
$ ls -1
deployment.yaml
hpa.yaml
kustomization.yaml
service.yaml
```

4
.cosign/cosign.pub Normal file
View File

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

View File

@@ -1,9 +0,0 @@
docs
deploy
charts
cloudbuild.yaml
skaffold.yaml
.gitignore
.travis.yml
LICENSE
README.md

1
.gitattributes vendored Normal file
View File

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

View File

@@ -1,17 +0,0 @@
FROM docker:stable
LABEL "name"="Docker tag and push action"
LABEL "maintainer"="Stefan Prodan <support@weave.works>"
LABEL "version"="1.0.0"
LABEL "com.github.actions.icon"="package"
LABEL "com.github.actions.color"="green"
LABEL "com.github.actions.name"="Docker Publish"
LABEL "com.github.actions.description"="This is an Action to run docker tag and push commands."
RUN apk add --no-cache ca-certificates bash git curl \
&& rm -rf /var/cache/apk/*
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,25 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
DOCKER_TAG="latest"
if [[ "${GITHUB_REF}" == "refs/tags"* ]]; then
DOCKER_TAG=$(echo ${GITHUB_REF} | rev | cut -d/ -f1 | rev)
else
DOCKER_TAG=$(echo ${GITHUB_REF} | rev | cut -d/ -f1 | rev)-$(echo ${GITHUB_SHA} | head -c7)
fi
if [[ "$1" == "build" ]]; then
docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} \
--build-arg REPOSITORY=${GITHUB_REPOSITORY} \
--build-arg SHA=${GITHUB_SHA} -f $2 .
echo "Docker image tagged as ${DOCKER_IMAGE}:${DOCKER_TAG}"
fi
if [[ "$1" == "push" ]]; then
docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
echo "Docker image pushed to ${DOCKER_IMAGE}:${DOCKER_TAG}"
fi

View File

@@ -1,20 +0,0 @@
FROM golang:1.10
LABEL "name"="golang tools action"
LABEL "maintainer"="Stefan Prodan <support@weave.works>"
LABEL "version"="1.0.0"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="green-dark"
LABEL "com.github.actions.name"="Go Tools"
LABEL "com.github.actions.description"="This is an Action to run go and dep commands."
ENV DEP_VERSION="v0.5.0"
RUN curl -fL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64 \
&& chmod +x /usr/local/bin/dep
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
set -e
APP_DIR="/go/src/github.com/${GITHUB_REPOSITORY}/"
mkdir -p ${APP_DIR} && cp -r ./ ${APP_DIR} && cd ${APP_DIR}
if [[ "$1" == "fmt" ]]; then
echo "Running go fmt"
files=$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*") 2>&1)
if [ "$files" ]; then
echo "These files did not pass the gofmt check:"
echo ${files}
exit 1
fi
fi
if [[ "$1" == "test" ]]; then
echo "Running go test"
go test $(go list ./... | grep -v /vendor/) -race -coverprofile=coverage.txt -covermode=atomic
cat coverage.txt
fi

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

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

View File

@@ -0,0 +1,9 @@
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

@@ -0,0 +1,25 @@
#!/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 "$BIN_DIR" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH

35
.github/main.workflow vendored
View File

@@ -1,35 +0,0 @@
workflow "Publish container" {
on = "push"
resolves = ["Push"]
}
action "Lint" {
uses = "./.github/actions/golang"
args = "fmt"
}
action "Test" {
needs = ["Lint"]
uses = "./.github/actions/golang"
args = "test"
}
action "Build" {
needs = ["Test"]
uses = "./.github/actions/docker"
secrets = ["DOCKER_IMAGE"]
args = ["build", "Dockerfile.gh"]
}
action "Login" {
needs = ["Build"]
uses = "actions/docker/login@master"
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
}
action "Push" {
needs = ["Login"]
uses = "./.github/actions/docker"
secrets = ["DOCKER_IMAGE"]
args = "push"
}

31
.github/workflows/cve-scan.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: cve-scan
on:
push:
branches:
- 'master'
permissions:
contents: read
jobs:
trivy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build image
id: build
run: |
IMAGE=test/podinfo:${GITHUB_SHA}
docker build -t ${IMAGE} .
echo "::set-output name=image::$IMAGE"
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ steps.build.outputs.image }}
format: table
exit-code: "1"
ignore-unfixed: true
vuln-type: os,library
severity: CRITICAL,HIGH

77
.github/workflows/e2e.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: e2e
on:
pull_request:
push:
branches:
- 'master'
permissions:
contents: read
jobs:
kind-helm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Kubernetes
uses: helm/kind-action@v1.8.0
with:
version: v0.20.0
cluster_name: kind
- name: Build container image
run: |
./test/build.sh
kind load docker-image test/podinfo:latest
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.12.3
- name: Deploy
run: ./test/deploy.sh
- name: Run integration tests
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:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@main
- name: Setup Kubernetes
uses: helm/kind-action@v1.8.0
with:
version: v0.20.0
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: 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

151
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,151 @@
name: release
on:
push:
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
steps:
- uses: actions/checkout@v4
- uses: sigstore/cosign-installer@v3
- uses: fluxcd/flux2/action@main
- uses: stefanprodan/timoni/actions/setup@main
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.12.3
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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@v5
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@v5
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 }} \
--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 OCI artifacts
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@v5
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
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish config artifact
run: |
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
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}}
- uses: ./.github/actions/release-notes
- name: Generate release notes
run: |
echo 'CHANGELOG' > /tmp/release.txt
github-release-notes -org stefanprodan -repo podinfo -since-latest-release >> /tmp/release.txt
- name: Publish release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --release-notes=/tmp/release.txt --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

72
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: test
on:
pull_request:
push:
branches:
- 'master'
permissions:
contents: read
env:
KUBERNETES_VERSION: 1.26.0
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup kubectl
uses: azure/setup-kubectl@v3
with:
version: v${{ env.KUBERNETES_VERSION }}
- name: Setup kubeconform
uses: ./.github/actions/kubeconform
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.10.3
- name: Setup CUE
uses: cue-lang/setup-cue@v1.0.0
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@main
- 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

4
.gitignore vendored
View File

@@ -19,3 +19,7 @@ release/
build/
gcloud/
dist/
bin/
cue/cue.mod/gen/
cue/go.mod
cue/go.sum

View File

@@ -1,7 +1,7 @@
builds:
- main: ./cmd/podcli
binary: podcli
ldflags: -s -w -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION={{.Commit}}
ldflags: -s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION={{.Commit}}
goos:
- windows
- darwin
@@ -10,12 +10,7 @@ builds:
- amd64
env:
- CGO_ENABLED=0
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386
archive:
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*

View File

@@ -1,41 +0,0 @@
sudo: required
language: go
go:
- 1.11.x
services:
- docker
addons:
apt:
packages:
- docker-ce
before_install:
- make dep
script:
- make test
- make build docker-build
after_success:
- if [ -z "$DOCKER_USER" ]; then
echo "PR build, skipping Docker Hub push";
else
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin;
make docker-push;
fi
- if [ -z "$QUAY_USER" ]; then
echo "PR build, skipping Quay push";
else
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
make quay-push;
fi
deploy:
- provider: script
skip_cleanup: true
script: curl -sL http://git.io/goreleaser | bash
on:
tags: true

View File

@@ -1,14 +1,41 @@
FROM alpine:3.7
FROM golang:1.21-alpine as builder
ARG REVISION
RUN mkdir -p /podinfo/
WORKDIR /podinfo
COPY . .
RUN go mod download
RUN CGO_ENABLED=0 go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podinfo cmd/podinfo/*
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.18
ARG BUILD_DATE
ARG VERSION
ARG REVISION
LABEL maintainer="stefanprodan"
RUN addgroup -S app \
&& adduser -S -g app app \
&& adduser -S -G app app \
&& apk --no-cache add \
curl openssl netcat-openbsd
ca-certificates curl netcat-openbsd
WORKDIR /home/app
COPY ./ui ./ui
ADD podinfo .
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

10
Dockerfile.base Normal file
View File

@@ -0,0 +1,10 @@
FROM golang:1.21
WORKDIR /workspace
# copy modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache modules
RUN go mod download

View File

@@ -1,6 +0,0 @@
FROM alpine:3.7
COPY ./ui ./ui
ADD podinfo /podinfo
CMD ["./podinfo"]

View File

@@ -1,37 +0,0 @@
FROM golang:1.11 as builder
RUN mkdir -p /go/src/github.com/stefanprodan/k8s-podinfo/
WORKDIR /go/src/github.com/stefanprodan/k8s-podinfo
COPY . .
RUN go test $(go list ./... | grep -v integration | grep -v /vendor/ | grep -v /template/) -cover
RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") && \
GIT_COMMIT=$(git rev-list -1 HEAD) && \
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
-X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
-a -installsuffix cgo -o podinfo ./cmd/podinfo
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
-X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
-a -installsuffix cgo -o podcli ./cmd/podcli
FROM alpine:3.8
RUN addgroup -S app \
&& adduser -S -g app app \
&& apk --no-cache add \
curl openssl netcat-openbsd
WORKDIR /home/app
COPY --from=builder /go/src/github.com/stefanprodan/k8s-podinfo/podinfo .
COPY --from=builder /go/src/github.com/stefanprodan/k8s-podinfo/podcli /usr/local/bin/podcli
COPY ./ui ./ui
RUN chown -R app:app ./
USER app
CMD ["./podinfo"]

View File

@@ -1,39 +0,0 @@
FROM golang:1.11 as builder
ARG REPOSITORY
ARG SHA
RUN mkdir -p /go/src/github.com/${REPOSITORY}/
WORKDIR /go/src/github.com/${REPOSITORY}
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X github.com/${REPOSITORY}/pkg/version.REVISION=${SHA}" \
-a -installsuffix cgo -o podinfo ./cmd/podinfo \
&& mv podinfo /usr/local/bin/podinfo
RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X github.com/${REPOSITORY}/pkg/version.REVISION=${SHA}" \
-a -installsuffix cgo -o podcli ./cmd/podcli \
&& mv podcli /usr/local/bin/podcli
FROM alpine:3.8
RUN addgroup -S app \
&& adduser -S -g app app \
&& apk --no-cache add \
curl openssl netcat-openbsd
WORKDIR /home/app
COPY --from=builder /usr/local/bin/podinfo .
COPY --from=builder /usr/local/bin/podcli /usr/local/bin/podcli
COPY ./ui ./ui
RUN chown -R app:app ./
USER app
CMD ["./podinfo"]

53
Dockerfile.xx Normal file
View File

@@ -0,0 +1,53 @@
ARG GO_VERSION=1.21
ARG XX_VERSION=1.2.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.18
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"]

449
Gopkg.lock generated
View File

@@ -1,449 +0,0 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:a281ff052e060998bc715e444e448f6762a6da3e20e68c689dd8696e2894a5fd"
name = "github.com/aws/aws-sdk-go"
packages = [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
"aws/client/metadata",
"aws/corehandlers",
"aws/credentials",
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
"aws/csm",
"aws/defaults",
"aws/ec2metadata",
"aws/endpoints",
"aws/request",
"aws/session",
"aws/signer/v4",
"internal/ini",
"internal/s3err",
"internal/sdkio",
"internal/sdkrand",
"internal/sdkuri",
"internal/shareddefaults",
"private/protocol",
"private/protocol/eventstream",
"private/protocol/eventstream/eventstreamapi",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
"private/protocol/restxml",
"private/protocol/xml/xmlutil",
"service/s3",
"service/sts",
]
pruneopts = "UT"
revision = "f76d9803fd695eebf74cb23c460287fa496efc21"
version = "v1.15.63"
[[projects]]
branch = "master"
digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d"
name = "github.com/beorn7/perks"
packages = ["quantile"]
pruneopts = "UT"
revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
[[projects]]
branch = "master"
digest = "1:37011b20a70e205b93ebea5287e1afa5618db54bf3998c36ff5a8e4b146a170a"
name = "github.com/bgentry/go-netrc"
packages = ["netrc"]
pruneopts = "UT"
revision = "9fd32a8b3d3d3f9d43c341bfe098430e07609480"
[[projects]]
digest = "1:b95738a1e6ace058b5b8544303c0871fc01d224ef0d672f778f696265d0f2917"
name = "github.com/chzyer/readline"
packages = ["."]
pruneopts = "UT"
revision = "62c6fe6193755f722b8b8788aa7357be55a50ff1"
version = "v1.4"
[[projects]]
digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55"
name = "github.com/dgrijalva/jwt-go"
packages = ["."]
pruneopts = "UT"
revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
version = "v3.2.0"
[[projects]]
digest = "1:865079840386857c809b72ce300be7580cb50d3d3129ce11bf9aa6ca2bc1934a"
name = "github.com/fatih/color"
packages = ["."]
pruneopts = "UT"
revision = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4"
version = "v1.7.0"
[[projects]]
digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd"
name = "github.com/fsnotify/fsnotify"
packages = ["."]
pruneopts = "UT"
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
digest = "1:97df918963298c287643883209a2c3f642e6593379f97ab400c2a2e219ab647d"
name = "github.com/golang/protobuf"
packages = ["proto"]
pruneopts = "UT"
revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5"
version = "v1.2.0"
[[projects]]
digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1"
name = "github.com/gorilla/context"
packages = ["."]
pruneopts = "UT"
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
version = "v1.1.1"
[[projects]]
digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f"
name = "github.com/gorilla/mux"
packages = ["."]
pruneopts = "UT"
revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
version = "v1.6.2"
[[projects]]
digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d"
name = "github.com/gorilla/websocket"
packages = ["."]
pruneopts = "UT"
revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d"
version = "v1.4.0"
[[projects]]
digest = "1:f47d6109c2034cb16bd62b220e18afd5aa9d5a1630fe5d937ad96a4fb7cbb277"
name = "github.com/hashicorp/go-cleanhttp"
packages = ["."]
pruneopts = "UT"
revision = "e8ab9daed8d1ddd2d3c4efba338fe2eeae2e4f18"
version = "v0.5.0"
[[projects]]
branch = "master"
digest = "1:724d270a4cac0945dedb8de6357625a9d976cb640d381d3dab3144cec295db26"
name = "github.com/hashicorp/go-getter"
packages = [
".",
"helper/url",
]
pruneopts = "UT"
revision = "4bda8fa99001c61db3cad96b421d4c12a81f256d"
[[projects]]
digest = "1:605c47454db9040e30b20dc1b29e3e9d42d6ee742545729cdef74afb1b898ad0"
name = "github.com/hashicorp/go-safetemp"
packages = ["."]
pruneopts = "UT"
revision = "c9a55de4fe06c920a71964b53cfe3dd293a3c743"
version = "v1.0.0"
[[projects]]
digest = "1:77395dd3847dac9c45118c668f5dab85aedf0163dc3b38aea6578c5cf0d502f9"
name = "github.com/hashicorp/go-version"
packages = ["."]
pruneopts = "UT"
revision = "b5a281d3160aa11950a6182bd9a9dc2cb1e02d50"
version = "v1.0.0"
[[projects]]
branch = "master"
digest = "1:a361611b8c8c75a1091f00027767f7779b29cb37c456a71b8f2604c88057ab40"
name = "github.com/hashicorp/hcl"
packages = [
".",
"hcl/ast",
"hcl/parser",
"hcl/printer",
"hcl/scanner",
"hcl/strconv",
"hcl/token",
"json/parser",
"json/scanner",
"json/token",
]
pruneopts = "UT"
revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"
[[projects]]
digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be"
name = "github.com/inconshreveable/mousetrap"
packages = ["."]
pruneopts = "UT"
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
version = "v1.0"
[[projects]]
digest = "1:e22af8c7518e1eab6f2eab2b7d7558927f816262586cd6ed9f349c97a6c285c4"
name = "github.com/jmespath/go-jmespath"
packages = ["."]
pruneopts = "UT"
revision = "0b12d6b5"
[[projects]]
digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7"
name = "github.com/magiconair/properties"
packages = ["."]
pruneopts = "UT"
revision = "c2353362d570a7bfa228149c62842019201cfb71"
version = "v1.8.0"
[[projects]]
digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67"
name = "github.com/mattn/go-colorable"
packages = ["."]
pruneopts = "UT"
revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
version = "v0.0.9"
[[projects]]
digest = "1:0981502f9816113c9c8c4ac301583841855c8cf4da8c72f696b3ebedf6d0e4e5"
name = "github.com/mattn/go-isatty"
packages = ["."]
pruneopts = "UT"
revision = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"
version = "v0.0.4"
[[projects]]
digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc"
name = "github.com/matttproud/golang_protobuf_extensions"
packages = ["pbutil"]
pruneopts = "UT"
revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c"
version = "v1.0.1"
[[projects]]
digest = "1:78bbb1ba5b7c3f2ed0ea1eab57bdd3859aec7e177811563edc41198a760b06af"
name = "github.com/mitchellh/go-homedir"
packages = ["."]
pruneopts = "UT"
revision = "ae18d6b8b3205b561c79e8e5f69bff09736185f4"
version = "v1.0.0"
[[projects]]
digest = "1:42eb1f52b84a06820cedc9baec2e710bfbda3ee6dac6cdb97f8b9a5066134ec6"
name = "github.com/mitchellh/go-testing-interface"
packages = ["."]
pruneopts = "UT"
revision = "6d0b8010fcc857872e42fc6c931227569016843c"
version = "v1.0.0"
[[projects]]
branch = "master"
digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
pruneopts = "UT"
revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac"
[[projects]]
digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e"
name = "github.com/pelletier/go-toml"
packages = ["."]
pruneopts = "UT"
revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194"
version = "v1.2.0"
[[projects]]
digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb"
name = "github.com/prometheus/client_golang"
packages = [
"prometheus",
"prometheus/promhttp",
]
pruneopts = "UT"
revision = "c5b7fccd204277076155f10851dad72b76a49317"
version = "v0.8.0"
[[projects]]
branch = "master"
digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4"
name = "github.com/prometheus/client_model"
packages = ["go"]
pruneopts = "UT"
revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f"
[[projects]]
branch = "master"
digest = "1:63b68062b8968092eb86bedc4e68894bd096ea6b24920faca8b9dcf451f54bb5"
name = "github.com/prometheus/common"
packages = [
"expfmt",
"internal/bitbucket.org/ww/goautoneg",
"model",
]
pruneopts = "UT"
revision = "c7de2306084e37d54b8be01f3541a8464345e9a5"
[[projects]]
branch = "master"
digest = "1:8c49953a1414305f2ff5465147ee576dd705487c35b15918fcd4efdc0cb7a290"
name = "github.com/prometheus/procfs"
packages = [
".",
"internal/util",
"nfs",
"xfs",
]
pruneopts = "UT"
revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92"
[[projects]]
digest = "1:bd1ae00087d17c5a748660b8e89e1043e1e5479d0fea743352cda2f8dd8c4f84"
name = "github.com/spf13/afero"
packages = [
".",
"mem",
]
pruneopts = "UT"
revision = "787d034dfe70e44075ccc060d346146ef53270ad"
version = "v1.1.1"
[[projects]]
digest = "1:516e71bed754268937f57d4ecb190e01958452336fa73dbac880894164e91c1f"
name = "github.com/spf13/cast"
packages = ["."]
pruneopts = "UT"
revision = "8965335b8c7107321228e3e3702cab9832751bac"
version = "v1.2.0"
[[projects]]
digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939"
name = "github.com/spf13/cobra"
packages = ["."]
pruneopts = "UT"
revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
version = "v0.0.3"
[[projects]]
branch = "master"
digest = "1:8a020f916b23ff574845789daee6818daf8d25a4852419aae3f0b12378ba432a"
name = "github.com/spf13/jwalterweatherman"
packages = ["."]
pruneopts = "UT"
revision = "14d3d4c518341bea657dd8a226f5121c0ff8c9f2"
[[projects]]
digest = "1:dab83a1bbc7ad3d7a6ba1a1cc1760f25ac38cdf7d96a5cdd55cd915a4f5ceaf9"
name = "github.com/spf13/pflag"
packages = ["."]
pruneopts = "UT"
revision = "9a97c102cda95a86cec2345a6f09f55a939babf5"
version = "v1.0.2"
[[projects]]
digest = "1:4fc8a61287ccfb4286e1ca5ad2ce3b0b301d746053bf44ac38cf34e40ae10372"
name = "github.com/spf13/viper"
packages = ["."]
pruneopts = "UT"
revision = "907c19d40d9a6c9bb55f040ff4ae45271a4754b9"
version = "v1.1.0"
[[projects]]
digest = "1:4aeb3860275fa1fd60cccfb5a6ef85da438bf17402e1e84412ade4d4b55066a0"
name = "github.com/ulikunitz/xz"
packages = [
".",
"internal/hash",
"internal/xlog",
"lzma",
]
pruneopts = "UT"
revision = "0c6b41e72360850ca4f98dc341fd999726ea007f"
version = "v0.5.4"
[[projects]]
digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d"
name = "go.uber.org/atomic"
packages = ["."]
pruneopts = "UT"
revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289"
version = "v1.3.2"
[[projects]]
digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a"
name = "go.uber.org/multierr"
packages = ["."]
pruneopts = "UT"
revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a"
version = "v1.1.0"
[[projects]]
digest = "1:c52caf7bd44f92e54627a31b85baf06a68333a196b3d8d241480a774733dcf8b"
name = "go.uber.org/zap"
packages = [
".",
"buffer",
"internal/bufferpool",
"internal/color",
"internal/exit",
"zapcore",
]
pruneopts = "UT"
revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982"
version = "v1.9.1"
[[projects]]
branch = "master"
digest = "1:e3e7f51633f98fce9404940f74dfd65cf306ee173ddf5a8b247c9c830e42b38a"
name = "golang.org/x/sys"
packages = ["unix"]
pruneopts = "UT"
revision = "1a700e749ce29638d0bbcb531cce1094ea096bd3"
[[projects]]
digest = "1:8029e9743749d4be5bc9f7d42ea1659471767860f0cdc34d37c3111bd308a295"
name = "golang.org/x/text"
packages = [
"internal/gen",
"internal/triegen",
"internal/ucd",
"transform",
"unicode/cldr",
"unicode/norm",
]
pruneopts = "UT"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/chzyer/readline",
"github.com/dgrijalva/jwt-go",
"github.com/fatih/color",
"github.com/fsnotify/fsnotify",
"github.com/gorilla/mux",
"github.com/gorilla/websocket",
"github.com/hashicorp/go-getter",
"github.com/prometheus/client_golang/prometheus",
"github.com/prometheus/client_golang/prometheus/promhttp",
"github.com/spf13/cobra",
"github.com/spf13/pflag",
"github.com/spf13/viper",
"go.uber.org/zap",
"go.uber.org/zap/zapcore",
]
solver-name = "gps-cdcl"
solver-version = 1

View File

@@ -1,39 +0,0 @@
[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.8.0"
[[constraint]]
name = "github.com/gorilla/mux"
version = "v1.6.2"
[[constraint]]
name = "github.com/gorilla/websocket"
version = "v1.4.0"
[[constraint]]
name = "go.uber.org/zap"
version = "v1.9.1"
[[override]]
name = "github.com/fsnotify/fsnotify"
version = "1.2.9"
[[constraint]]
name = "github.com/spf13/pflag"
version = "v1.0.2"
[[constraint]]
name = "github.com/spf13/viper"
version = "v1.1.0"
[[constraint]]
name = "github.com/spf13/cobra"
version = "v0.0.3"
[[constraint]]
name = "github.com/dgrijalva/jwt-go"
version = "v3.2.0"
[prune]
go-tests = true
unused-packages = true

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.

188
Makefile
View File

@@ -1,114 +1,100 @@
# Makefile for releasing Alpine multi-arch Docker images
# Makefile for releasing podinfo
#
# The release version is controlled from pkg/version
EMPTY:=
SPACE:=$(EMPTY) $(EMPTY)
COMMA:=$(EMPTY),$(EMPTY)
TAG?=latest
NAME:=podinfo
DOCKER_REPOSITORY:=stefanprodan
DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME)
GITREPO:=github.com/stefanprodan/k8s-podinfo
GITCOMMIT:=$(shell git describe --dirty --always)
GIT_COMMIT:=$(shell git describe --dirty --always)
VERSION:=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4 }' | tr -d '"')
LINUX_ARCH:=arm arm64 ppc64le s390x amd64
PLATFORMS:=$(subst $(SPACE),$(COMMA),$(foreach arch,$(LINUX_ARCH),linux/$(arch)))
EXTRA_RUN_ARGS?=
.PHONY: build
build:
@echo Cleaning old builds
@rm -rf build && mkdir build
@echo Building: linux/$(LINUX_ARCH) $(VERSION) ;\
for arch in $(LINUX_ARCH); do \
mkdir -p build/linux/$$arch && CGO_ENABLED=0 GOOS=linux GOARCH=$$arch go build -ldflags="-s -w -X $(GITREPO)/pkg/version.REVISION=$(GITCOMMIT)" -o build/linux/$$arch/$(NAME) ./cmd/$(NAME) ;\
cp -r ui/ build/linux/$$arch/ui;\
done
.PHONY: tar
tar: build
@echo Cleaning old releases
@rm -rf release && mkdir release
for arch in $(LINUX_ARCH); do \
tar -zcf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/linux/$$arch $(NAME) ;\
done
.PHONY: docker-build
docker-build: tar
# Steps:
# 1. Copy appropriate podinfo binary to build/docker/linux/<arch>
# 2. Copy Dockerfile to build/docker/linux/<arch>
# 3. Replace base image from alpine:latest to <arch>/alpine:latest
# 4. Comment RUN in Dockerfile
# <arch>:
# arm: arm32v6
# arm64: arm64v8
rm -rf build/docker
@for arch in $(LINUX_ARCH); do \
mkdir -p build/docker/linux/$$arch ;\
tar -xzf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/docker/linux/$$arch ;\
cp -r ui/ build/docker/linux/$$arch/ui;\
if [ $$arch == amd64 ]; then \
cp Dockerfile build/docker/linux/$$arch ;\
cp Dockerfile build/docker/linux/$$arch/Dockerfile.in ;\
else \
cp Dockerfile.build build/docker/linux/$$arch/Dockerfile ;\
cp Dockerfile.build build/docker/linux/$$arch/Dockerfile.in ;\
case $$arch in \
arm) \
BASEIMAGE=arm32v6 ;\
;; \
arm64) \
BASEIMAGE=arm64v8 ;\
;; \
*) \
BASEIMAGE=$$arch ;\
;; \
esac ;\
sed -e "s/alpine:latest/$$BASEIMAGE\\/alpine:latest/" -e "s/^\\s*RUN/#RUN/" build/docker/linux/$$arch/Dockerfile.in > build/docker/linux/$$arch/Dockerfile ;\
fi ;\
docker build -t $(NAME) build/docker/linux/$$arch ;\
docker tag $(NAME) $(DOCKER_IMAGE_NAME):$(NAME)-$$arch ;\
done
.PHONY: docker-push
docker-push:
@echo Pushing: $(VERSION) to $(DOCKER_IMAGE_NAME)
for arch in $(LINUX_ARCH); do \
docker push $(DOCKER_IMAGE_NAME):$(NAME)-$$arch ;\
done
manifest-tool push from-args --platforms $(PLATFORMS) --template $(DOCKER_IMAGE_NAME):podinfo-ARCH --target $(DOCKER_IMAGE_NAME):$(VERSION)
manifest-tool push from-args --platforms $(PLATFORMS) --template $(DOCKER_IMAGE_NAME):podinfo-ARCH --target $(DOCKER_IMAGE_NAME):latest
.PHONY: quay-push
quay-push:
@echo Pushing: $(VERSION) to quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
@docker build -t quay.io/$(DOCKER_IMAGE_NAME):$(VERSION) -f Dockerfile.ci . ; docker push quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
.PHONY: clean
clean:
rm -rf release
rm -rf build
.PHONY: gcr-build
gcr-build:
docker build -t gcr.io/$(DOCKER_IMAGE_NAME):$(VERSION) -f Dockerfile.ci .
run:
go run -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" cmd/podinfo/* \
--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)
.PHONY: test
test:
go test -v -race ./...
go test ./... -coverprofile cover.out
.PHONY: dep
dep:
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/estesp/manifest-tool
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/*
.PHONY: charts
charts:
cd charts/ && helm package podinfo/
cd charts/ && helm package podinfo-istio/
cd charts/ && helm package loadtest/
cd charts/ && helm package ambassador/
cd charts/ && helm package grafana/
cd charts/ && helm package ngrok/
mv charts/*.tgz docs/
helm repo index docs --url https://stefanprodan.github.io/k8s-podinfo --merge ./docs/index.yaml
tidy:
rm -f go.sum; go mod tidy -compat=1.19
vet:
go vet ./...
fmt:
gofmt -l -s -w ./
goimports -l -w ./
build-charts:
helm lint charts/*
helm package 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 .
push-base: build-base
docker push $(DOCKER_REPOSITORY)/podinfo-base:latest
test-container:
@docker rm -f podinfo || true
@docker run -dp 9898:9898 --name=podinfo $(DOCKER_IMAGE_NAME):$(VERSION)
@docker ps
@TOKEN=$$(curl -sd 'test' localhost:9898/token | jq -r .token) && \
curl -sH "Authorization: Bearer $${TOKEN}" localhost:9898/token/validate | grep test
push-container:
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_NAME):latest
docker push $(DOCKER_IMAGE_NAME):$(VERSION)
docker push $(DOCKER_IMAGE_NAME):latest
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) quay.io/$(DOCKER_IMAGE_NAME):latest
docker push quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
docker push quay.io/$(DOCKER_IMAGE_NAME):latest
version-set:
@next="$(TAG)" && \
current="$(VERSION)" && \
/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/$$current/$$next/g" timoni/podinfo/values.cue && \
echo "Version $$next set in code, deployment, module, chart and kustomize"
release:
git tag -s -m $(VERSION) $(VERSION)
git push origin $(VERSION)
swagger:
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 && $$(go env GOPATH)/bin/swag init -g server.go
.PHONY: timoni-build
timoni-build:
@timoni build podinfo ./timoni/podinfo -f ./timoni/podinfo/test_values.cue

View File

@@ -1,17 +0,0 @@
DOCKER_IMAGE?=stefanprodan/k8s-podinfo
DOCKER_TAG?=$(shell git symbolic-ref --short HEAD)
GIT_REPOSITORY?=stefanprodan/k8s-podinfo
GIT_SHA:=$(shell git describe --dirty --always)
.PHONY: all
all: test build
.PHONY: test
test:
go test ./...
.PHONY: build
build:
docker build -t $(DOCKER_IMAGE):$(DOCKER_TAG) \
--build-arg REPOSITORY=${GIT_REPOSITORY} \
--build-arg SHA=${GIT_SHA} -f Dockerfile.gh .

190
README.md
View File

@@ -1,21 +1,31 @@
# k8s-podinfo
# podinfo
Podinfo is a tiny web application made with Go
that showcases best practices of running microservices in Kubernetes.
[![e2e](https://github.com/stefanprodan/podinfo/workflows/e2e/badge.svg)](https://github.com/stefanprodan/podinfo/blob/master/.github/workflows/e2e.yml)
[![test](https://github.com/stefanprodan/podinfo/workflows/test/badge.svg)](https://github.com/stefanprodan/podinfo/blob/master/.github/workflows/test.yml)
[![cve-scan](https://github.com/stefanprodan/podinfo/workflows/cve-scan/badge.svg)](https://github.com/stefanprodan/podinfo/blob/master/.github/workflows/cve-scan.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/stefanprodan/podinfo)](https://goreportcard.com/report/github.com/stefanprodan/podinfo)
[![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:
* Release automation (Make/TravisCI/CircleCI/Quay.io/Google Cloud Container Builder/Skaffold/Weave Flux)
* Multi-platform Docker image (amd64/arm/arm64/ppc64le/s390x)
* Health checks (readiness and liveness)
* Graceful shutdown on interrupt signals
* File watcher for secrets and configmaps
* Instrumented with Prometheus
* Tracing with Istio and Jaeger
* Instrumented with Prometheus and Open Telemetry
* Structured logging with zap
* 12-factor app with viper
* Fault injection (random errors and latency)
* Helm chart
* Swagger docs
* [Timoni](http://github.com/stefanprodan/timoni), Helm and Kustomize installers
* End-to-End testing with Kubernetes Kind and Helm
* 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 Trivy
Web API:
@@ -35,17 +45,161 @@ Web API:
* `POST /token` issues a JWT token valid for one minute `JWT=$(curl -sd 'anon' podinfo:9898/token | jq -r .token)`
* `GET /token/validate` validates the JWT token `curl -H "Authorization: Bearer $JWT" podinfo:9898/token/validate`
* `GET /configs` returns a JSON with configmaps and/or secrets mounted in the `config` volume
* `POST /write` writes the posted content to disk at /data/hash and returns the SHA1 hash of the content
* `GET /read/{hash}` returns the content of the file /data/hash if exists
* `POST/PUT /cache/{key}` saves the posted content to Redis
* `GET /cache/{key}` returns the content from Redis if the key exists
* `DELETE /cache/{key}` deletes the key from Redis if exists
* `POST /store` writes the posted content to disk at /data/hash and returns the SHA1 hash of the content
* `GET /store/{hash}` returns the content of the file /data/hash if exists
* `GET /ws/echo` echos content via websockets `podcli ws ws://localhost:9898/ws/echo`
* `GET /chunked/{seconds}` uses `transfer-encoding` type `chunked` to give a partial response and then waits for the specified period
* `GET /swagger.json` returns the API Swagger docs, used for Linkerd service profiling and Gloo routes discovery
gRPC API:
* `/grpc.health.v1.Health/Check` health checking
Web UI:
![podinfo-ui](https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/screens/podinfo-ui-v3.png)
To access the Swagger UI open `<podinfo-host>/swagger/index.html` in a browser.
### Guides
* [Deploy and upgrade with Helm](docs/1-deploy.md)
* [Horizontal Pod Auto-scaling](docs/2-autoscaling.md)
* [Monitoring and alerting with Prometheus](docs/3-monitoring.md)
* [StatefulSets with local persistent volumes](docs/4-statefulsets.md)
* [Expose Kubernetes services over HTTPS with Ngrok](docs/6-ngrok.md)
* [A/B Testing with Ambassador API Gateway](docs/5-canary.md)
* [Canary Deployments with Istio](docs/7-istio.md)
* [GitHub Actions CI demo](docs/8-gh-actions.md)
* [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/)
### Install
To install Podinfo on Kubernetes the minimum required version is **Kubernetes v1.23**.
#### Helm
Install from github.io:
```bash
helm repo add podinfo https://stefanprodan.github.io/podinfo
helm upgrade --install --wait frontend \
--namespace test \
--set replicaCount=2 \
--set backend=http://backend-podinfo:9898/echo \
podinfo/podinfo
helm test frontend --namespace test
helm upgrade --install --wait backend \
--namespace test \
--set redis.enabled=true \
podinfo/podinfo
```
Install from ghcr.io:
```bash
helm upgrade --install --wait podinfo --namespace default \
oci://ghcr.io/stefanprodan/charts/podinfo
```
#### Timoni
Install with [Timoni](https://timoni.sh):
```bash
timoni -n default apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo
```
#### Kustomize
```bash
kubectl apply -k github.com/stefanprodan/podinfo//kustomize
```
#### 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,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,11 +0,0 @@
apiVersion: v1
appVersion: "0.29.0"
description: A Helm chart for Datawire Ambassador
name: ambassador
version: 0.1.0
sources:
- https://github.com/datawire/ambassador
maintainers:
- name: stefanprodan
email: stefanprodan@users.noreply.github.com
engine: gotpl

View File

@@ -1,63 +0,0 @@
# Ambassador
Ambassador is an open source, Kubernetes-native [microservices API gateway](https://www.getambassador.io/about/microservices-api-gateways) built on the [Envoy Proxy](https://www.envoyproxy.io/).
## TL;DR;
```console
$ helm install stable/ambassador
```
## Introduction
This chart bootstraps an [Ambassador](https://www.getambassador.io) deployment on
a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.7+
## Installing the Chart
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release stable/ambassador
```
The command deploys Ambassador API gateway on the Kubernetes cluster in the default configuration.
The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete --purge my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the Ambassador chart and their default values.
| Parameter | Description | Default |
| ------------------------------- | ------------------------------------------ | ---------------------------------------------------------- |
| `image` | Image | `quay.io/datawire/ambassador`
| `imageTag` | Image tag | `0.29.0`
| `imagePullPolicy` | Image pull policy | `IfNotPresent`
| `replicaCount` | Number of Ambassador replicas | `1`
| `resources` | CPU/memory resource requests/limits | None
| `rbac.create` | If `true`, create and use RBAC resources | `true`
| `serviceAccount.create` | If `true`, create a new service account | `true`
| `serviceAccount.name` | Service account to be used | `ambassador`
| `service.type` | Service type to be used | `LoadBalancer`
| `adminService.create` | If `true`, create a service for Ambassador's admin UI | `true`
| `adminService.type` | Ambassador's admin service type to be used | `ClusterIP`
| `exporter.image` | Prometheus exporter image | `datawire/prom-statsd-exporter:0.6.0`
| `timing.restart` | The minimum number of seconds between Envoy restarts | `15`
| `timing.drain` | The number of seconds that the Envoy will wait for open connections to drain on a restart | `5`
| `timing.shutdown` | The number of seconds that Ambassador will wait for the old Envoy to clean up and exit on a restart | `10`

View File

@@ -1,15 +0,0 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ambassador.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.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 "ambassador.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ambassador.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ambassador.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -1,43 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ambassador.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ambassador.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 -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ambassador.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "ambassador.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "ambassador.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,21 +0,0 @@
{{- if .Values.adminService.create -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "ambassador.fullname" . }}-admin
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.adminService.type }}
ports:
- port: 8877
targetPort: admin
protocol: TCP
name: admin
selector:
app: {{ template "ambassador.name" . }}
release: {{ .Release.Name }}
{{- end -}}

View File

@@ -1,78 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "ambassador.fullname" . }}
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "ambassador.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "ambassador.name" . }}
release: {{ .Release.Name }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9102"
spec:
serviceAccountName: {{ template "ambassador.serviceAccountName" . }}
containers:
- name: statsd-sink
image: "{{ .Values.exporter.image }}"
ports:
- name: metrics
containerPort: 9102
- name: ambassador
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
- name: admin
containerPort: 8877
env:
- name: AMBASSADOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: AMBASSADOR_RESTART_TIME
value: {{ .Values.timing.restart | quote }}
- name: AMBASSADOR_DRAIN_TIME
value: {{ .Values.timing.drain | quote }}
- name: AMBASSADOR_SHUTDOWN_TIME
value: {{ .Values.timing.shutdown | quote }}
livenessProbe:
httpGet:
path: /ambassador/v0/check_alive
port: admin
initialDelaySeconds: 30
periodSeconds: 3
readinessProbe:
httpGet:
path: /ambassador/v0/check_ready
port: admin
initialDelaySeconds: 30
periodSeconds: 3
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@@ -1,42 +0,0 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: {{ template "ambassador.fullname" . }}
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
rules:
- apiGroups: [""]
resources:
- services
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["create", "update", "patch", "get", "list", "watch"]
- apiGroups: [""]
resources:
- secrets
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: {{ template "ambassador.fullname" . }}
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "ambassador.fullname" . }}
subjects:
- name: {{ template "ambassador.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
kind: ServiceAccount
{{- end -}}

View File

@@ -1,23 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "ambassador.fullname" . }}
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: 443
targetPort: https
protocol: TCP
name: https
selector:
app: {{ template "ambassador.name" . }}
release: {{ .Release.Name }}

View File

@@ -1,11 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "ambassador.serviceAccountName" . }}
labels:
app: {{ template "ambassador.name" . }}
chart: {{ template "ambassador.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end -}}

View File

@@ -1,56 +0,0 @@
# Default values for ambassador.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: quay.io/datawire/ambassador
tag: 0.29.0
pullPolicy: IfNotPresent
service:
type: LoadBalancer
port: 80
adminService:
create: true
type: ClusterIP
rbac:
# Specifies whether RBAC resources should be created
create: true
serviceAccount:
# Specifies whether a service account should be created
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
resources: {}
# If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
exporter:
image: datawire/prom-statsd-exporter:0.6.0
timing:
# sets the minimum number of seconds between Envoy restarts
restart: 15
# sets the number of seconds that the Envoy will wait for open connections to drain on a restart
drain: 5
# sets the number of seconds that Ambassador will wait for the old Envoy to clean up and exit on a restart
shutdown: 10

View File

@@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: grafana
version: 0.1.0

View File

@@ -1,65 +0,0 @@
# Weave Cloud Grafana
Grafana v5 with Kubernetes dashboards and Prometheus and Weave Cloud data sources.
## Installing the Chart
To install the chart with the release name `my-release`:
```console
$ helm install stable/grafana --name my-release \
--set service.type=NodePort \
--set token=WEAVE-TOKEN \
--set password=admin
```
The command deploys Grafana on the Kubernetes cluster in the default namespace.
The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete --purge my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the Grafana chart and their default values.
Parameter | Description | Default
--- | --- | ---
`image.repository` | Image repository | `grafana/grafana`
`image.pullPolicy` | Image pull policy | `IfNotPresent`
`image.tag` | Image tag | `5.0.1`
`replicaCount` | desired number of pods | `1`
`resources` | pod resources | `none`
`tolerations` | List of node taints to tolerate | `[]`
`affinity` | node/pod affinities | `node`
`nodeSelector` | node labels for pod assignment | `{}`
`service.type` | type of service | `LoadBalancer`
`url` | Prometheus URL, used when Weave token is empty | `http://prometheus:9090`
`token` | Weave Cloud token | `none`
`user` | Grafana admin username | `admin`
`password` | Grafana admin password | `none`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm install stable/grafana --name my-release \
--set=token=WEAVE-TOKEN \
--set password=admin
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install stable/grafana --name my-release -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,817 +0,0 @@
{
"annotations": {
"list": [
{
"$$hashKey": "object:246",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"id": null,
"iteration": 1521457664773,
"links": [],
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "prometheus",
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 4,
"w": 8,
"x": 0,
"y": 0
},
"id": 8,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "cores",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m])) ",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
"step": 600
}
],
"thresholds": "",
"title": "CPU",
"type": "singlestat",
"valueFontSize": "110%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "prometheus",
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 4,
"w": 8,
"x": 8,
"y": 0
},
"id": 9,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "GB",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "80%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"expr": "sum(container_memory_usage_bytes{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}) / 1024^3",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
"step": 600
}
],
"thresholds": "",
"title": "Memory",
"type": "singlestat",
"valueFontSize": "110%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "prometheus",
"editable": true,
"error": false,
"format": "Bps",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": false
},
"gridPos": {
"h": 4,
"w": 8,
"x": 16,
"y": 0
},
"id": 7,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"expr": "sum(rate(container_network_transmit_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m])) ",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
"step": 600
}
],
"thresholds": "",
"title": "Network",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"gridPos": {
"h": 6,
"w": 20,
"x": 0,
"y": 4
},
"id": 1,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideZero": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "max(kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "current replicas",
"refId": "A",
"step": 30
},
{
"expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "available",
"refId": "B",
"step": 30
},
{
"expr": "max(kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "unavailable",
"refId": "C",
"step": 30
},
{
"expr": "min(kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "updated",
"refId": "D",
"step": 30
},
{
"expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "desired",
"refId": "E",
"step": 30
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Replicas",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"transparent": false,
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "none",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
]
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "prometheus",
"editable": true,
"error": false,
"format": "percent",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 6,
"w": 4,
"x": 20,
"y": 4
},
"id": 11,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"expr": "(min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod))\n/\n(min(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)) * 100\n",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
"refId": "A",
"step": 600
}
],
"thresholds": "50,80",
"title": "Availability",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"fill": 1,
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 10
},
"id": 10,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sort_desc(\n\nsum by (pod_name) (rate(container_cpu_usage_seconds_total{image!=\"\",container_name!=\"POD\",namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[1m])) \n\n)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ pod_name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Pods CPU",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "none",
"label": "cores",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"fill": 1,
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 16
},
"id": 13,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sort_desc(\n\nsum by (pod_name) (container_memory_working_set_bytes{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}) \n\n)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ pod_name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Pods Memory",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"fill": 1,
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 22
},
"id": 12,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sort_desc(\n\nsum by (pod_name) (rate (container_network_receive_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[1m])) \n+\nsum by (pod_name) (rate (container_network_transmit_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[1m]))\n)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ pod_name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Pods Network I/O",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"refresh": "30s",
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": ".*",
"current": {
"text": "default",
"value": "default"
},
"datasource": "prometheus",
"hide": 0,
"includeAll": false,
"label": "Namespace",
"multi": false,
"name": "deployment_namespace",
"options": [],
"query": "label_values(kube_deployment_metadata_generation, namespace)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": null,
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"text": "ga-podinfo",
"value": "ga-podinfo"
},
"datasource": "prometheus",
"hide": 0,
"includeAll": false,
"label": "Deployment",
"multi": false,
"name": "deployment_name",
"options": [],
"query": "label_values(kube_deployment_metadata_generation{namespace=\"$deployment_namespace\"}, deployment)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "deployment",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Deployments",
"uid": "sgRyigkik",
"version": 2
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "grafana.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.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 "grafana.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "grafana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "grafana.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "grafana.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 -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "grafana.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "grafana.fullname" . }}-dashboards
data:
{{ (.Files.Glob "dashboards/*").AsConfig | indent 2 }}

View File

@@ -1,32 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "grafana.fullname" . }}-datasources
data:
datasources.yaml: |-
apiVersion: 1
deleteDatasources:
- name: prometheus
{{- if .Values.token }}
datasources:
- name: prometheus
type: prometheus
access: proxy
url: https://cloud.weave.works/api/prom
isDefault: true
editable: true
version: 1
basicAuth: true
basicAuthUser: weave
basicAuthPassword: {{ .Values.token }}
{{- else }}
datasources:
- name: prometheus
type: prometheus
access: proxy
url: {{ .Values.url }}
isDefault: true
editable: true
version: 1
{{- end }}

View File

@@ -1,81 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "grafana.fullname" . }}
labels:
app: {{ template "grafana.fullname" . }}
chart: {{ template "grafana.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "grafana.fullname" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "grafana.fullname" . }}
release: {{ .Release.Name }}
annotations:
prometheus.io/scrape: 'false'
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 3000
protocol: TCP
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
env:
- name: GF_SECURITY_ADMIN_USER
value: {{ .Values.user }}
- name: GF_SECURITY_ADMIN_PASSWORD
value: {{ .Values.password }}
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning/
volumeMounts:
- name: grafana
mountPath: /var/lib/grafana
- name: dashboards
mountPath: /etc/grafana/dashboards
- name: datasources
mountPath: /etc/grafana/provisioning/datasources
- name: providers
mountPath: /etc/grafana/provisioning/dashboards
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: grafana
emptyDir: {}
- name: dashboards
configMap:
name: {{ template "grafana.fullname" . }}-dashboards
- name: providers
configMap:
name: {{ template "grafana.fullname" . }}-providers
- name: datasources
configMap:
name: {{ template "grafana.fullname" . }}-datasources

View File

@@ -1,17 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "grafana.fullname" . }}-providers
data:
providers.yaml: |+
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/dashboards

View File

@@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "grafana.fullname" . }}
labels:
app: {{ template "grafana.name" . }}
chart: {{ template "grafana.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "grafana.fullname" . }}
release: {{ .Release.Name }}

View File

@@ -1,34 +0,0 @@
# Default values for grafana.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: grafana/grafana
tag: 5.0.1
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
user: admin
password:
url: http://prometheus:9090
token:

View File

@@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: Hey load test Helm chart for Kubernetes
name: loadtest
version: 0.1.0

View File

@@ -1 +0,0 @@
{{ template "loadtest.fullname" . }} has been deployed successfully!

View File

@@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "loadtest.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "loadtest.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 -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "loadtest.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,31 +0,0 @@
{{- $fullname := include "loadtest.fullname" . -}}
{{- $name := include "loadtest.name" . -}}
{{- $chart := include "loadtest.chart" . -}}
{{- $image := .Values.image -}}
{{- range $test := .Values.tests }}
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: {{ $fullname }}-{{ .name }}
labels:
app: {{ $name }}
chart: {{ $chart }}
spec:
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
spec:
containers:
- name: loadtest
image: {{ $image }}
args:
- /bin/sh
- -c
- "hey -z 58s {{ $test.cmd }} {{ $test.url }}"
restartPolicy: OnFailure
{{- end -}}

View File

@@ -1,11 +0,0 @@
# Default values for loadtest.
image: stefanprodan/loadtest:latest
tests:
- name: "blue"
url: "https://canary.istio.weavedx.com/api/echo"
cmd: "-h2 -m POST -d '{test: 1}' -H 'X-API-Version: 0.6.0' -c 50 -q 5"
- name: "green"
url: "https://canary.istio.weavedx.com/api/echo"
cmd: "-h2 -m POST -d '{test: 2}' -H 'X-API-Version: 0.6.1' -c 10 -q 5"

View File

@@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Ngrok Helm chart for Kubernetes
name: ngrok
version: 0.1.0

View File

@@ -1,63 +0,0 @@
# Ngrok
Expose Kubernetes service with [Ngrok](https://ngrok.com).
## Installing the Chart
To install the chart with the release name `my-release`:
```console
$ helm install sp/ngrok --name my-release \
--set token=NGROK-TOKEN \
--set expose.service=podinfo:9898
```
The command deploys Ngrok on the Kubernetes cluster in the default namespace.
The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete --purge my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the Grafana chart and their default values.
Parameter | Description | Default
--- | --- | ---
`image.repository` | Image repository | `stefanprodan/ngrok`
`image.pullPolicy` | Image pull policy | `IfNotPresent`
`image.tag` | Image tag | `latest`
`replicaCount` | desired number of pods | `1`
`tolerations` | List of node taints to tolerate | `[]`
`affinity` | node/pod affinities | `node`
`nodeSelector` | node labels for pod assignment | `{}`
`service.type` | type of service | `ClusterIP`
`token` | Ngrok auth token | `none`
`expose.service` | Service address to be exposed as in `service-name:port` | `none`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm upgrade --install --wait tunel \
--set token=NGROK-TOKEN \
--set service.type=NodePort \
--set expose.service=podinfo:9898 \
sp/ngrok
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install sp/grafana --name my-release -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)
```

View File

@@ -1,15 +0,0 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ngrok.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.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 "ngrok.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ngrok.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ngrok.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ngrok.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ngrok.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 -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ngrok.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,12 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "ngrok.fullname" . }}
data:
ngrok.yml: |-
web_addr: 0.0.0.0:4040
update: false
log: stdout
{{- if .Values.token }}
authtoken: {{ .Values.token }}
{{- end }}

View File

@@ -1,62 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "ngrok.fullname" . }}
labels:
app: {{ template "ngrok.name" . }}
chart: {{ template "ngrok.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "ngrok.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "ngrok.name" . }}
release: {{ .Release.Name }}
annotations:
prometheus.io/scrape: 'false'
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- ./ngrok
- http
- {{ .Values.expose.service }}
volumeMounts:
- name: config
mountPath: /home/ngrok/.ngrok2
ports:
- name: http
containerPort: 4040
protocol: TCP
livenessProbe:
httpGet:
path: /api/tunnels
port: http
initialDelaySeconds: 10
periodSeconds: 30
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "ngrok.fullname" . }}

View File

@@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "ngrok.fullname" . }}
labels:
app: {{ template "ngrok.name" . }}
chart: {{ template "ngrok.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "ngrok.name" . }}
release: {{ .Release.Name }}

View File

@@ -1,25 +0,0 @@
# Default values for ngrok.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: stefanprodan/ngrok
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 4040
expose:
service: ga-podinfo:9898
token: 4i3rDinhLqMHtvez71N9S_38rkS7onwv77VFNZTaUR6
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,12 +0,0 @@
apiVersion: v1
version: 1.2.1
appVersion: 1.2.1
engine: gotpl
name: podinfo-istio
description: Podinfo Helm chart for Istio
home: https://github.com/stefanprodan/k8s-podinfo
maintainers:
- email: stefanprodan@users.noreply.github.com
name: stefanprodan
sources:
- https://github.com/stefanprodan/k8s-podinfo

View File

@@ -1,80 +0,0 @@
# Podinfo Istio
Podinfo is a tiny web application made with Go
that showcases best practices of running microservices in Kubernetes.
## Installing the Chart
Create an Istio enabled namespace:
```console
kubectl create namespace demo
kubectl label namespace demo istio-injection=enabled
```
Create an Istio Gateway in the `istio-system` namespace named `public-gateway`:
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: public-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
tls:
httpsRedirect: true
- port:
number: 443
name: https
protocol: HTTPS
hosts:
- "*"
tls:
mode: SIMPLE
privateKey: /etc/istio/ingressgateway-certs/tls.key
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
```
Create the `frontend` release by specifying the external domain name:
```console
helm upgrade frontend --install ./charts/podinfo-istio \
--namespace=demo \
--set host=podinfo.example.com \
--set gateway.name=public-gateway \
--set gateway.create=false \
-f ./charts/podinfo-istio/frontend.yaml
```
Create the `backend` release:
```console
helm upgrade backend --install ./charts/podinfo-istio \
--namespace=demo \
-f ./charts/podinfo-istio/backend.yaml
```
Create the `store` release:
```console
helm upgrade store --install ./charts/podinfo-istio \
--namespace=demo \
-f ./charts/podinfo-istio/store.yaml
```
Start load test:
```console
helm upgrade --install loadtest ./charts/loadtest \
--namespace=loadtesting
```

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env bash
#Usage: fswatch -o ./podinfo-istio/ | xargs -n1 ./podinfo-istio/apply.sh
set -e
MARK='\033[0;32m'
NC='\033[0m'
log (){
echo -e "$(date +%Y-%m-%dT%H:%M:%S%z) ${MARK}${1}${NC}"
}
log "installing frontend"
helm upgrade frontend --install ./podinfo-istio \
--namespace=demo \
--set host=canary.istio.weavedx.com \
--set gateway.name=public-gateway \
--set gateway.create=false \
-f ./podinfo-istio/frontend.yaml
log "installing backend"
helm upgrade backend --install ./podinfo-istio \
--namespace=demo \
-f ./podinfo-istio/backend.yaml
log "installing store"
helm upgrade store --install ./podinfo-istio \
--namespace=demo \
-f ./podinfo-istio/store.yaml
log "finished installing frontend, backend and store"

View File

@@ -1,21 +0,0 @@
# Default values for backend demo.
# expose the blue/green deployments inside the cluster
host: backend
# stable release
blue:
replicas: 2
tag: "1.1.1"
backend: http://store:9898/api/echo
# canary release
green:
replicas: 2
tag: "1.2.0"
routing:
# target green callers
- match:
- sourceLabels:
color: green
backend: http://store:9898/api/echo

View File

@@ -1,39 +0,0 @@
# Default values for frontend demo.
# external domain
host:
exposeHost: true
# no more than one Gateway can be created on a cluster
# if TLS is enabled the istio-ingressgateway-certs secret must exist in istio-system ns
# if you have a Gateway running you can set the name to your own gateway and turn off create
gateway:
name: public-gateway
create: false
tls: true
httpsRedirect: true
# stable release
blue:
replicas: 2
tag: "1.1.1"
message: "Greetings from the blue frontend"
backend: http://backend:9898/api/echo
# canary release
green:
replicas: 2
tag: "1.2.0"
routing:
# target Safari
- match:
- headers:
user-agent:
regex: "^(?!.*Chrome).*Safari.*"
# target API clients by version
- match:
- headers:
x-api-version:
regex: "^(v{0,1})0\\.6\\.([1-9]).*"
message: "Greetings from the green frontend"
backend: http://backend:9898/api/echo

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +0,0 @@
# Default values for backend demo.
# expose the store deployment inside the cluster
host: store
# load balance 80/20 between blue and green
blue:
replicas: 2
tag: "1.1.1"
backend: https://httpbin.org/anything
weight: 80
green:
replicas: 2
tag: "1.2.0"
backend: https://httpbin.org/anything
externalServices:
- httpbin.org

View File

@@ -1 +0,0 @@
{{ template "podinfo-istio.fullname" . }} has been deployed successfully!

View File

@@ -1,36 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "podinfo-istio.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
The release name is used as a full name.
*/}}
{{- define "podinfo-istio.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- define "podinfo-istio.blue" -}}
{{- printf "%s-%s" .Release.Name "blue" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "podinfo-istio.green" -}}
{{- printf "%s-%s" .Release.Name "green" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "podinfo-istio.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,79 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "podinfo-istio.blue" . }}
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
color: blue
version: {{ .Values.blue.tag }}
spec:
replicas: {{ .Values.blue.replicas }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "podinfo-istio.fullname" . }}
color: blue
template:
metadata:
labels:
app: {{ template "podinfo-istio.fullname" . }}
color: blue
version: {{ .Values.blue.tag }}
annotations:
prometheus.io/scrape: 'true'
spec:
terminationGracePeriodSeconds: 30
containers:
- name: podinfod
image: "{{ .Values.blue.repository }}:{{ .Values.blue.tag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- ./podinfo
- --port={{ .Values.containerPort }}
- --level={{ .Values.logLevel }}
- --random-delay={{ .Values.blue.faults.delay }}
- --random-error={{ .Values.blue.faults.error }}
env:
- name: PODINFO_UI_COLOR
value: blue
{{- if .Values.blue.backend }}
- name: PODINFO_BACKEND_URL
value: {{ .Values.blue.backend }}
{{- end }}
{{- if .Values.blue.message }}
- name: PODINFO_UI_MESSAGE
value: {{ .Values.blue.message }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.containerPort }}
protocol: TCP
livenessProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.containerPort }}/healthz
readinessProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.containerPort }}/readyz
periodSeconds: 3
volumeMounts:
- name: data
mountPath: /data
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
- name: data
emptyDir: {}

View File

@@ -1,20 +0,0 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "podinfo-istio.fullname" . }}
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
host: {{ template "podinfo-istio.fullname" . }}
subsets:
- name: blue
labels:
color: blue
{{- if gt .Values.green.replicas 0.0 }}
- name: green
labels:
color: green
{{- end }}

View File

@@ -1,22 +0,0 @@
{{- if .Values.externalServices -}}
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: {{ template "podinfo-istio.fullname" . }}-external-svcs
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
hosts:
{{- range .Values.externalServices }}
- {{ . }}
{{- end }}
location: MESH_EXTERNAL
ports:
- number: 443
name: https
protocol: HTTPS
resolution: DNS
{{- end }}

View File

@@ -1,31 +0,0 @@
{{- if .Values.gateway.create -}}
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: {{ .Values.gateway.name }}
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
tls:
httpsRedirect: {{ .Values.gateway.httpsRedirect }}
{{- if .Values.gateway.tls }}
- port:
number: 443
name: https
protocol: HTTPS
hosts:
- "*"
tls:
mode: SIMPLE
privateKey: /etc/istio/ingressgateway-certs/tls.key
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
{{- end }}
{{- end }}

View File

@@ -1,81 +0,0 @@
{{- if gt .Values.green.replicas 0.0 -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "podinfo-istio.green" . }}
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
color: green
version: {{ .Values.green.tag }}
spec:
replicas: {{ .Values.green.replicas }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "podinfo-istio.fullname" . }}
color: green
template:
metadata:
labels:
app: {{ template "podinfo-istio.fullname" . }}
color: green
version: {{ .Values.green.tag }}
annotations:
prometheus.io/scrape: 'true'
spec:
terminationGracePeriodSeconds: 30
containers:
- name: podinfod
image: "{{ .Values.green.repository }}:{{ .Values.green.tag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- ./podinfo
- --port={{ .Values.containerPort }}
- --level={{ .Values.logLevel }}
- --random-delay={{ .Values.green.faults.delay }}
- --random-error={{ .Values.green.faults.error }}
env:
- name: PODINFO_UI_COLOR
value: green
{{- if .Values.green.backend }}
- name: PODINFO_BACKEND_URL
value: {{ .Values.green.backend }}
{{- end }}
{{- if .Values.green.message }}
- name: PODINFO_UI_MESSAGE
value: {{ .Values.green.message }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.containerPort }}
protocol: TCP
livenessProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.containerPort }}/healthz
readinessProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.containerPort }}/readyz
periodSeconds: 3
volumeMounts:
- name: data
mountPath: /data
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
- name: data
emptyDir: {}
{{- end }}

View File

@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "podinfo-istio.fullname" . }}
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- port: {{ .Values.containerPort }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "podinfo-istio.fullname" . }}

View File

@@ -1,43 +0,0 @@
{{- $host := .Release.Name -}}
{{- $timeout := .Values.timeout -}}
{{- $greenWeight := (sub 100 (.Values.blue.weight|int)) | int -}}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ template "podinfo-istio.fullname" . }}
labels:
app: {{ template "podinfo-istio.fullname" . }}
chart: {{ template "podinfo-istio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
hosts:
- {{ .Values.host }}
{{- if .Values.exposeHost }}
gateways:
- {{ .Values.gateway.name }}.istio-system.svc.cluster.local
{{- end }}
http:
{{- if gt .Values.green.replicas 0.0 }}
{{- range .Values.green.routing }}
- match:
{{ toYaml .match | indent 6 }}
route:
- destination:
host: {{ $host }}
subset: green
timeout: {{ $timeout }}
{{- end }}
{{- end }}
- route:
- destination:
host: {{ template "podinfo-istio.fullname" . }}
subset: blue
weight: {{ .Values.blue.weight }}
{{- if gt .Values.green.replicas 0.0 }}
- destination:
host: {{ template "podinfo-istio.fullname" . }}
subset: green
weight: {{ $greenWeight }}
{{- end }}
timeout: {{ $timeout }}

View File

@@ -1,60 +0,0 @@
# Default values for podinfo-istio.
# host can be an external domain or a local one
host: podinfo
# if the host is an external domain must be exposed via the Gateway
exposeHost: false
timeout: 30s
# creates public-gateway.istio-system.svc.cluster.local
# no more than one Gateway can be created on a cluster
# if TLS is enabled the istio-ingressgateway-certs secret must exist in istio-system ns
# if you have a Gateway running you can set the name to your own gateway and turn off create
gateway:
name: public-gateway
create: false
tls: false
httpsRedirect: false
# authorise external https services
#externalServices:
# - api.github.com
# - apis.google.com
# - googleapis.com
# stable release
# by default all traffic goes to blue
blue:
replicas: 2
repository: quay.io/stefanprodan/podinfo
tag: "1.2.1"
# green must have at at least one replica to set weight under 100
weight: 100
message:
backend:
faults:
delay: false
error: false
# canary release
# disabled with 0 replicas
green:
replicas: 0
repository: quay.io/stefanprodan/podinfo
tag: "1.2.1"
message:
backend:
routing:
faults:
delay: false
error: false
# blue/green common settings
logLevel: info
containerPort: 9898
imagePullPolicy: IfNotPresent
resources:
limits:
requests:
cpu: 1m
memory: 16Mi

View File

@@ -1,12 +1,13 @@
apiVersion: v1
version: 1.3.1
appVersion: 1.3.1
version: 6.5.0
appVersion: 6.5.0
name: podinfo
engine: gotpl
description: Podinfo Helm chart for Kubernetes
home: https://github.com/stefanprodan/k8s-podinfo
home: https://github.com/stefanprodan/podinfo
maintainers:
- email: stefanprodan@users.noreply.github.com
name: stefanprodan
sources:
- https://github.com/stefanprodan/k8s-podinfo
- https://github.com/stefanprodan/podinfo
kubeVersion: ">=1.23.0-0"

View File

@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@@ -1,15 +1,36 @@
# 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 `my-release` from GHCR:
```console
$ helm repo add sp https://stefanprodan.github.io/k8s-podinfo
$ helm upgrade my-release --install sp/podinfo
$ helm upgrade -i my-release oci://ghcr.io/stefanprodan/charts/podinfo
```
To verify a chart with Cosign:
```console
$ cosign verify ghcr.io/stefanprodan/charts/podinfo:<VERSION>
```
Alternatively, you can install the chart from GitHub pages:
```console
$ helm repo add podinfo https://stefanprodan.github.io/podinfo
$ helm upgrade -i my-release podinfo/podinfo
```
The command deploys podinfo on the Kubernetes cluster in the default namespace.
@@ -20,7 +41,7 @@ The [configuration](#configuration) section lists the parameters that can be con
To uninstall/delete the `my-release` deployment:
```console
$ helm delete --purge my-release
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
@@ -29,53 +50,81 @@ 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 | Description | Default
--- | --- | ---
`affinity` | node/pod affinities | None
`color` | UI color | blue
`backend` | echo backend URL | None
`faults.delay` | random HTTP response delays between 0 and 5 seconds | `false`
`faults.error` | 1/3 chances of a random HTTP response error | `false`
`hpa.enabled` | enables HPA | `false`
`hpa.cpu` | target CPU usage per pod | None
`hpa.memory` | target memory usage per pod | None
`hpa.requests` | target requests per second per pod | None
`hpa.maxReplicas` | maximum pod replicas | `10`
`ingress.hosts` | ingress accepted hostnames | None
`ingress.tls` | ingress TLS configuration | None:
`image.pullPolicy` | image pull policy | `IfNotPresent`
`image.repository` | image repository | `stefanprodan/podinfo`
`image.tag` | image tag | `0.0.1`
`ingress.enabled` | enables ingress | `false`
`ingress.annotations` | ingress annotations | None
`ingress.hosts` | ingress accepted hostnames | None
`ingress.tls` | ingress TLS configuration | None
`message` | UI greetings message | None
`nodeSelector` | node labels for pod assignment | `{}`
`replicaCount` | desired number of pods | `2`
`resources.requests/cpu` | pod CPU request | `1m`
`resources.requests/memory` | pod memory request | `16Mi`
`resources.limits/cpu` | pod CPU limit | None
`resources.limits/memory` | pod memory limit | None
`service.externalPort` | external port for the service | `9898`
`service.internalPort` | internal port for the service | `9898`
`service.nodePort` | node port for the service | `31198`
`service.type` | type of service | `ClusterIP`
`tolerations` | list of node taints to tolerate | `[]`
| 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 |
| `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` | `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 |
| `h2c.enabled` | `false` | Allow upgrading to h2c (non-TLS version of HTTP/2) |
| `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 |
| `serviceAccount.imagePullSecrets` | `[]` | List of image pull secrets if pulling from private registries. |
| `securityContext` | `{}` | The security context to be set on the podinfo container |
| `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 |
| `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 |
| `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 |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm install stable/podinfo --name my-release \
--set=image.tag=0.0.2,service.type=NodePort
$ helm install my-release podinfo/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
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install stable/podinfo --name my-release -f values.yaml
$ helm install my-release podinfo/podinfo -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)
```

View File

@@ -1,7 +1,9 @@
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" . }})
@@ -11,9 +13,8 @@
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}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "podinfo.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
kubectl -n {{ .Release.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,21 +11,59 @@ 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 -}}
{{- 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 }}
{{/*
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 }}
{{/*
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,16 @@
{{- if .Values.certificate.create -}}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ template "podinfo.fullname" . }}
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

@@ -1,53 +1,104 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "podinfo.fullname" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
color: {{ .Values.color }}
version: {{ .Values.image.tag }}
{{- include "podinfo.labels" . | nindent 4 }}
spec:
{{- if not .Values.hpa.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "podinfo.name" . }}
color: {{ .Values.color }}
version: {{ .Values.image.tag }}
release: {{ .Release.Name }}
{{- include "podinfo.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: {{ template "podinfo.name" . }}
color: {{ .Values.color }}
version: {{ .Values.image.tag }}
release: {{ .Release.Name }}
{{- include "podinfo.selectorLabels" . | nindent 8 }}
annotations:
prometheus.io/scrape: 'true'
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.service.httpPort }}"
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
terminationGracePeriodSeconds: 30
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ template "podinfo.serviceAccountName" . }}
{{- 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.containerPort }}
- --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 }}
{{- if .Values.service.grpcPort }}
- --grpc-port={{ .Values.service.grpcPort }}
{{- end }}
{{- if .Values.service.grpcService }}
- --grpc-service-name={{ .Values.service.grpcService }}
{{- end }}
{{- range .Values.backends }}
- --backend-url={{ . }}
{{- end }}
{{- if .Values.cache }}
- --cache-server={{ .Values.cache }}
{{- else if .Values.redis.enabled }}
- --cache-server=tcp://{{ template "podinfo.fullname" . }}-redis:6379
{{- end }}
- --level={{ .Values.logLevel }}
- --random-delay={{ .Values.faults.delay }}
- --random-error={{ .Values.faults.error }}
{{- if .Values.faults.unhealthy }}
- --unhealthy
{{- end }}
{{- if .Values.faults.unready }}
- --unready
{{- end }}
{{- if .Values.h2c.enabled }}
- --h2c
{{- end }}
env:
- name: PODINFO_UI_COLOR
value: {{ .Values.color }}
{{- if .Values.message }}
{{- if .Values.ui.message }}
- name: PODINFO_UI_MESSAGE
value: {{ .Values.message }}
value: {{ quote .Values.ui.message }}
{{- end }}
{{- if .Values.ui.logo }}
- name: PODINFO_UI_LOGO
value: {{ .Values.ui.logo }}
{{- end }}
{{- if .Values.ui.color }}
- name: PODINFO_UI_COLOR
value: {{ quote .Values.ui.color }}
{{- end }}
{{- if .Values.backend }}
- name: PODINFO_BACKEND_URL
@@ -55,26 +106,81 @@ spec:
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.containerPort }}
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 }}
protocol: TCP
{{- end }}
{{- if .Values.service.grpcPort }}
- name: grpc
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:
- podcli
- check
- http
- localhost:{{ .Values.service.containerPort }}/healthz
- localhost:{{ .Values.service.httpPort | default 9898 }}/healthz
{{- 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:
- podcli
- check
- http
- localhost:{{ .Values.service.containerPort }}/readyz
periodSeconds: 3
- localhost:{{ .Values.service.httpPort | default 9898 }}/readyz
{{- 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.nodeSelector }}
@@ -92,3 +198,8 @@ spec:
volumes:
- name: data
emptyDir: {}
{{- if .Values.tls.enabled }}
- name: tls
secret:
secretName: {{ template "podinfo.tlsSecretName" . }}
{{- end }}

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