Compare commits

...

192 Commits

Author SHA1 Message Date
stakater-user
ac7e965326 [skip-ci] Update artifacts 2024-06-21 15:12:42 +00:00
Muneeb Aijaz
7f5ea8c18f Merge pull request #690 from alexanderldavis/enable_metrics_by_namespace
feat: add new opt-in metric of reloads by namespace
2024-06-21 19:53:31 +05:00
stakater-user
b73b04d9ae [skip-ci] Update artifacts 2024-06-21 13:50:22 +00:00
Kunj Bosamia
2e68364298 [ENHANCE] #639 , Add resources to the Reloader deployment. (#692)
* issue-639 , adding Resources to the values.yaml

* revert old change

* adding resources in helm template command

* add resources to  reloader.yaml file only

* Update readme about the default resource limit and request values

* fix lint error

* fix lint error
2024-06-21 19:15:24 +05:30
Bharath Nallapeta
0ab949f781 Merge pull request #696 from stakater/renovate/stakater-vale-package-0.x
chore(deps): update dependency stakater/vale-package to v0.0.27
2024-06-21 13:34:33 +05:30
renovate[bot]
e718be07c2 chore(deps): update dependency stakater/vale-package to v0.0.27 2024-06-19 09:51:03 +00:00
stakater-user
fb9748eae7 [skip-ci] Update artifacts 2024-06-19 09:50:00 +00:00
Bharath Nallapeta
d571ebec0c Merge pull request #688 from stakater/renovate/github.com-argoproj-argo-rollouts-1.x
fix(deps): update module github.com/argoproj/argo-rollouts to v1.7.0
2024-06-19 15:15:55 +05:30
renovate[bot]
1e285cbc11 fix(deps): update module github.com/argoproj/argo-rollouts to v1.7.0 2024-06-19 08:14:30 +00:00
Bharath Nallapeta
b557e68d16 Merge pull request #689 from stakater/renovate/stakater-.github-0.x
chore(deps): update stakater/.github action to v0.0.82
2024-06-19 13:42:58 +05:30
renovate[bot]
757f76c739 chore(deps): update stakater/.github action to v0.0.82 2024-06-19 08:03:50 +00:00
Bharath Nallapeta
0a3a01a859 Merge pull request #691 from stakater/renovate/github.com-spf13-cobra-1.x
fix(deps): update module github.com/spf13/cobra to v1.8.1
2024-06-19 13:32:32 +05:30
renovate[bot]
3848e031c2 fix(deps): update module github.com/spf13/cobra to v1.8.1 2024-06-15 00:04:07 +00:00
Alexander Davis
6cd458b8ed chore(tests): fix ReloadedByNamespace tests 2024-06-14 16:24:09 -05:00
Alexander Davis
09d90532e6 chore(docs): apply reviewdog grammar suggestion 2024-06-14 15:54:55 -05:00
Alexander Davis
220a9d5f68 fix: wrong conditional on new metric test 2024-06-14 15:49:22 -05:00
Alexander Davis
6eeba71273 chore(docs): add information about new opt-in metric 2024-06-14 15:30:30 -05:00
Alexander Davis
3f6e98a9d5 feat: add new opt-in metric of reloads by namespace 2024-06-14 15:20:38 -05:00
stakater-user
8595b4ac43 [skip-ci] Update artifacts 2024-06-11 14:13:20 +00:00
Muneeb Aijaz
aa1e2655bf Merge pull request #679 from IdanAdar/patch-1
Update .goreleaser.yml with support for IBM Power/ppc64le architecture
2024-06-11 19:08:31 +05:00
renovate[bot]
21711b347a chore(deps): update dependency stakater/vale-package to v0.0.25 (#680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-11 15:51:42 +02:00
Muneeb Aijaz
24d7b6b584 Merge pull request #682 from stakater/update-releaser
Update goreleaser with --clean flag
2024-06-11 18:43:59 +05:00
Muneeb Aijaz
4bbbbc26ea Update goreleaser with --clean flag 2024-06-11 18:38:34 +05:00
Idan Adar
c40632f11c Update .goreleaser.yml 2024-06-05 15:13:42 +03:00
stakater-user
1e752f5e3d [skip-ci] Update artifacts 2024-06-05 09:12:19 +00:00
Muneeb Aijaz
e8fdf56406 Merge pull request #677 from onedr0p/patch-1
chore: delete yq binary from repo
2024-06-05 13:08:57 +05:00
Devin Buhl
c3e40f2f34 Update .gitignore 2024-06-03 17:05:05 -04:00
Devin Buhl
d7a3d4ca7e chore: delete yq
Not sure why the yq binary is in this repo?
2024-06-03 17:02:48 -04:00
stakater-user
6f46ebc9ee [skip-ci] Update artifacts 2024-06-03 20:01:24 +00:00
Muneeb Aijaz
c71ce83b93 Merge pull request #673 from plotly/bump-go
bump go from 1.21.6 -> 1.21.9
2024-06-04 00:56:54 +05:00
stakater-user
ec2f2e8f0a [skip-ci] Update artifacts 2024-06-03 11:06:36 +00:00
renovate[bot]
e8a5b84603 chore(deps): update stakater/.github action to v0.0.79 (#674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 13:02:06 +02:00
renovate[bot]
b1ee068b89 chore(deps): update nginxinc/nginx-unprivileged docker tag to v1.27 (#676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 13:01:44 +02:00
Antoine Roy-Gobeil
7b088bed23 bump go from 1.21.6 -> 1.21.9 2024-05-30 17:36:17 -04:00
stakater-user
f682a69322 [skip-ci] Update artifacts 2024-05-30 17:58:13 +00:00
Muneeb Aijaz
5dea8d2afb Merge pull request #672 from plotly/go_modules/golang.org/x/net-0.25.0
Bump golang.org/x/net from 0.20.0 to 0.25.0
2024-05-30 22:53:43 +05:00
Antoine Roy-Gobeil
2c4a6d5e8b go mod tidy 2024-05-30 12:44:36 -04:00
Antoine Roy-Gobeil
8323a35609 Bump golang.org/x/net from 0.20.0 to 0.25.0 2024-05-30 12:22:56 -04:00
renovate[bot]
81199fdeb5 chore(deps): update stakater/.github action to v0.0.77 (#670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-30 09:19:09 +02:00
Muneeb Aijaz
f8ac8b949a Merge pull request #669 from stakater/renovate/stakater-vale-package-0.x
chore(deps): update dependency stakater/vale-package to v0.0.24
2024-05-30 11:58:10 +05:00
renovate[bot]
c9ea89480c chore(deps): update dependency stakater/vale-package to v0.0.24 2024-05-29 09:29:20 +00:00
renovate[bot]
667322ea29 chore(deps): update dependency stakater/vale-package to v0.0.23 (#668)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-29 10:14:33 +02:00
renovate[bot]
26faea70cc chore(deps): update dependency stakater/vale-package to v0.0.21 (#666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 13:22:34 +02:00
renovate[bot]
df92a3a3dc chore(deps): update stakater/.github action to v0.0.76 (#667)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 11:09:47 +02:00
stakater-user
c53ed24c2c [skip-ci] Update artifacts 2024-05-15 09:04:42 +00:00
Muhammad Sheryar Butt
c76234d9f3 Merge pull request #660 from stakater/renovate/stakater-.github-0.x
chore(deps): update stakater/.github action to v0.0.75
2024-05-15 13:59:59 +05:00
renovate[bot]
2e5e5b41eb chore(deps): update stakater/.github action to v0.0.75 2024-05-15 08:52:26 +00:00
stakater-user
195b129cdd [skip-ci] Update artifacts 2024-05-15 08:51:29 +00:00
Muhammad Sheryar Butt
bad7ad33a3 Merge pull request #661 from stakater/renovate/github.com-prometheus-client_golang-1.x
fix(deps): update module github.com/prometheus/client_golang to v1.19.1
2024-05-15 13:30:41 +05:00
renovate[bot]
5da570abb8 fix(deps): update module github.com/prometheus/client_golang to v1.19.1 2024-05-10 07:14:06 +00:00
stakater-user
a8710c8132 [skip-ci] Update artifacts 2024-05-10 07:12:50 +00:00
Muneeb Aijaz
6da76a7a7e Merge pull request #662 from miguel-cardoso-mindera/master
Change git submodule url from ssh to https
2024-05-10 12:08:17 +05:00
miguel-cardoso-mindera
335467843b Change git submodule url from ssh to https 2024-05-09 22:12:59 +01:00
renovate[bot]
adb519b4c7 chore(deps): update dependency stakater/vale-package to v0.0.19 (#654)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-08 10:17:08 +02:00
stakater-user
6c5e46c776 [skip-ci] Update artifacts 2024-04-28 17:48:33 +00:00
renovate[bot]
4e909e5df2 fix(deps): update k8s.io/utils digest to 0849a56 (#573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-28 19:08:24 +02:00
Karl Johan Grahn
63627bb7f3 update (#653) 2024-04-28 00:43:06 +02:00
stakater-user
906e622ce0 [skip-ci] Update artifacts 2024-04-27 21:25:21 +00:00
Karl Johan Grahn
30c0f5be0b Workflow updates for paths (#651)
* update

* update
2024-04-27 23:06:00 +02:00
stakater-user
d4b7d384ed [skip-ci] Update artifacts 2024-04-27 19:34:19 +00:00
Karl Johan Grahn
da9e526185 update (#650) 2024-04-27 21:15:15 +02:00
stakater-user
9a9fee2d10 [skip-ci] Update artifacts 2024-04-26 20:46:35 +00:00
renovate[bot]
c82dd8b730 chore(deps): update anothrnick/github-tag-action action to v1.69.0 (#635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 22:05:04 +02:00
stakater-user
0838acdb02 [skip-ci] Update artifacts 2024-04-26 17:12:43 +00:00
renovate[bot]
db927a2ff2 chore(deps): update stakater/.github action to v0.0.73 (#648)
* chore(deps): update stakater/.github action to v0.0.73

* update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Karl Johan Grahn <karl.johan@stakater.com>
2024-04-26 18:52:53 +02:00
stakater-user
5b602f68c3 [skip-ci] Update artifacts 2024-04-26 15:59:32 +00:00
renovate[bot]
95d2173a80 chore(deps): update golangci/golangci-lint-action action to v5 (#642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 17:39:56 +02:00
Karl Johan Grahn
e383fb2fed update (#647) 2024-04-26 17:08:13 +02:00
renovate[bot]
51d63c786e chore(deps): update dependency stakater/vale-package to v0.0.18 (#645)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 16:51:02 +02:00
renovate[bot]
481725b1c8 chore(deps): update nginxinc/nginx-unprivileged docker tag to v1.26 (#646)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 16:50:26 +02:00
stakater-user
70eafce2c1 [skip-ci] Update artifacts 2024-04-26 13:00:49 +00:00
Karl Johan Grahn
f0c3b61f56 Docs restructuring (#644)
* update

* update

* update
2024-04-26 14:55:15 +02:00
renovate[bot]
7cde0e7985 chore(deps): update stakater/.github action to v0.0.71 (#634)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Karl Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com>
2024-04-26 13:44:04 +02:00
stakater-user
768f7196b7 [skip-ci] Update artifacts 2024-04-26 11:38:11 +00:00
renovate[bot]
222a9fd42f chore(deps): update dependency stakater/vale-package to v0.0.17 (#637)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 13:33:31 +02:00
Karl Johan Grahn
467a2e6229 update (#643) 2024-04-25 21:23:35 +02:00
stakater-user
226f1159dc [skip-ci] Update artifacts 2024-04-24 09:50:08 +00:00
Muneeb Aijaz
24bb264c5a Merge pull request #641 from testwill/close_body
fix: close resp body
2024-04-24 14:44:28 +05:00
Muneeb Aijaz
038c923636 Merge branch 'master' into close_body 2024-04-24 14:37:49 +05:00
stakater-user
c1bc54d904 [skip-ci] Update artifacts 2024-04-24 08:22:50 +00:00
guangwu
0442c5512f fix: close resp body 2024-04-24 16:16:24 +08:00
Muneeb Aijaz
6f798c0664 Merge pull request #638 from diannaowa/loglevel
feat: supports --log-level argument  in command line
2024-04-24 13:03:33 +05:00
liuzhenwei
2094906dcb support --log-level argument in command line
Signed-off-by: liuzhenwei <dui_zhang@163.com>
2024-04-17 17:43:00 +08:00
stakater-user
de50a0e277 [skip-ci] Update artifacts 2024-04-17 08:06:06 +00:00
Muneeb Aijaz
3754fd51af Merge pull request #595 from stakater/renovate/github.com-prometheus-client_golang-1.x
fix(deps): update module github.com/prometheus/client_golang to v1.19.0
2024-04-17 13:00:48 +05:00
renovate[bot]
3bc789dde4 fix(deps): update module github.com/prometheus/client_golang to v1.19.0 2024-04-14 17:13:05 +00:00
stakater-user
9deefc7532 [skip-ci] Update artifacts 2024-04-14 17:11:38 +00:00
looklose
8510ee2ef3 chore: fix typo in comment (#633)
Signed-off-by: looklose <shishuaiqun@yeah.net>
Co-authored-by: Karl-Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com>
2024-04-10 19:37:25 +02:00
stakater-user
2d744741ba [skip-ci] Update artifacts 2024-04-10 11:26:44 +00:00
Bharath Nallapeta
7d44e9854a Merge pull request #624 from stakater/renovate/azure-setup-helm-4.x
chore(deps): update azure/setup-helm action to v4
2024-04-10 16:37:43 +05:30
renovate[bot]
c5d8dd84ad chore(deps): update azure/setup-helm action to v4 2024-04-10 10:22:35 +00:00
stakater-user
2098c9628c [skip-ci] Update artifacts 2024-04-10 10:21:02 +00:00
Bharath Nallapeta
86bec3e20f Merge pull request #615 from stakater/renovate/golangci-golangci-lint-action-4.x
chore(deps): update golangci/golangci-lint-action action to v4
2024-04-10 15:31:37 +05:30
renovate[bot]
8f458e32ac chore(deps): update golangci/golangci-lint-action action to v4 2024-04-10 13:53:12 +05:30
Bharath Nallapeta
1f64991a6d Merge pull request #632 from stakater/renovate/stakater-vale-package-0.x
chore(deps): update dependency stakater/vale-package to v0.0.15
2024-04-10 13:52:03 +05:30
renovate[bot]
b3fea5526c chore(deps): update dependency stakater/vale-package to v0.0.15 2024-04-09 15:26:45 +00:00
stakater-user
9e7fca4c29 [skip-ci] Update artifacts 2024-04-08 06:36:45 +00:00
Muneeb Aijaz
4c426817f4 Merge pull request #604 from kichel98/issue-582-auto-annotation-with-resource-type-squashed
[#582] Allow to use auto annotation with specific resource type (configmap or secret)
2024-04-08 11:17:28 +05:00
Muneeb Aijaz
1cae7a03f2 Merge branch 'master' into issue-582-auto-annotation-with-resource-type-squashed 2024-04-08 10:57:24 +05:00
stakater-user
ae5bc2cfdf [skip-ci] Update artifacts 2024-04-08 05:17:16 +00:00
Benjamin Walterscheid
fc60755558 issue/562 - enhance documentation for Reloader Chart values.yaml (#620)
* issue/562 - enhance documentation for Reloader Chart values.yaml

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - aligned unordered list indentation

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - removed leading reloader due to QA spell check issues

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - updated failing qa / spell_check README checks

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - updated failing qa / spell_check README checks

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - updated failing qa / spell_check README checks

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/562 - changed from helm to bash where needed

Signed-off-by: Benjamin Walterscheid <52604859+fdberlking@users.noreply.github.com>

---------

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>
Signed-off-by: Benjamin Walterscheid <52604859+fdberlking@users.noreply.github.com>
Co-authored-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>
Co-authored-by: Karl-Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com>
2024-04-05 08:06:02 +02:00
stakater-user
920cf8cf21 [skip-ci] Update artifacts 2024-04-03 11:43:53 +00:00
renovate[bot]
e0341720f5 chore(deps): update dependency stakater/vale-package to v0.0.14 (#623)
* chore(deps): update dependency stakater/vale-package to v0.0.14

* update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Karl Johan Grahn <karl.johan@stakater.com>
2024-04-03 13:39:16 +02:00
stakater-user
e72c25d574 [skip-ci] Update artifacts 2024-04-03 08:49:03 +00:00
Muneeb Aijaz
03ef902a6b Merge pull request #629 from stakater/renovate/stakater-.github-0.x
chore(deps): update stakater/.github action to v0.0.65
2024-04-03 13:07:53 +05:00
renovate[bot]
aafbea48a9 chore(deps): update stakater/.github action to v0.0.65 2024-03-27 09:10:56 +00:00
stakater-user
9385a4a70f [skip-ci] Update artifacts 2024-03-27 09:09:55 +00:00
Muneeb Aijaz
c75f0bdc34 Merge pull request #630 from joebowbeer/patch-1
fix: Add seccompProfile type to default securityContext
2024-03-27 14:05:08 +05:00
Joe Bowbeer
69565f91c0 Update values.yaml
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2024-03-21 23:40:27 -07:00
stakater-user
f8b425a366 [skip-ci] Update artifacts 2024-03-20 10:34:38 +00:00
Muneeb Aijaz
6a6307aef4 Merge pull request #625 from bnallapeta/fix-621
Add make target to remove labels and annotations from manifests
2024-03-20 15:29:55 +05:00
Bharath Nallapeta
e61547875a Merge branch 'master' into fix-621 2024-03-20 15:20:57 +05:30
stakater-user
43d7836b2a [skip-ci] Update artifacts 2024-03-20 09:43:18 +00:00
Bharath Nallapeta
ea12d91291 Merge branch 'master' into fix-621 2024-03-20 15:04:08 +05:30
Muneeb Aijaz
920c5d2f0f Merge pull request #611 from t3mi/vpa
feat(chart): add vpa support
2024-03-20 14:24:29 +05:00
bnallapeta
352f6ff230 Update deployment.yaml with reloader-reloader labels and selector 2024-03-07 11:42:55 +05:30
bnallapeta
08b02e0797 Remove labels and annotations from Kubernetes deployment.yaml 2024-03-04 17:10:30 +05:30
bnallapeta
221369bdcd Add make target to remove labels and annotations from manifests 2024-03-01 10:13:42 +05:30
Karl-Johan Grahn
3a07584fd0 Merge branch 'master' into vpa 2024-02-28 10:08:45 +01:00
Karl-Johan Grahn
b4fe7fb185 Merge branch 'master' into issue-582-auto-annotation-with-resource-type-squashed 2024-02-28 10:08:22 +01:00
stakater-user
0aa95c968a [skip-ci] Update artifacts 2024-02-23 18:20:55 +00:00
Tanveer Alam
5a25d8ae15 Merge pull request #617 from stakater/renovate/github.com-argoproj-argo-rollouts-1.x
fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.6
2024-02-21 17:20:21 +05:30
renovate[bot]
82f01d5e79 fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.6 2024-02-21 09:58:52 +00:00
Bharath Nallapeta
9a465a433c Merge pull request #605 from yangtian9999/add_helm_chart_namespace
Add namespace field to avoid helm template failure
2024-02-21 15:28:13 +05:30
yangtian9999
cca62bd458 Add namespace field to avoid helm template failure 2024-02-21 14:58:04 +05:30
Bharath Nallapeta
b28b345dad Merge pull request #612 from fdberlking/issue/587
issue/587 - [BUG] helm labels and annotations are added to k8s manifests built with kustomize
2024-02-21 14:57:29 +05:30
Bharath Nallapeta
0398d542e4 Merge branch 'master' into issue/587 2024-02-21 14:52:21 +05:30
stakater-user
36308361d2 [skip-ci] Update artifacts 2024-02-21 09:20:50 +00:00
Bharath Nallapeta
981dda6465 Merge branch 'master' into issue/587 2024-02-21 14:50:38 +05:30
Bharath Nallapeta
2cfd29d533 Merge pull request #616 from stakater/renovate/stakater-vale-package-0.x
chore(deps): update dependency stakater/vale-package to v0.0.8
2024-02-21 14:45:22 +05:30
renovate[bot]
f9bd4526ed chore(deps): update dependency stakater/vale-package to v0.0.8 2024-02-13 09:29:32 +00:00
t3mi
c69ce749fc Merge branch 'master' into vpa 2024-02-08 19:17:30 +02:00
Benjamin Walterscheid
48e2db44be Merge branch 'master' into issue/587 2024-02-07 12:40:39 +01:00
stakater-user
35cae84a60 [skip-ci] Update artifacts 2024-02-07 09:54:40 +00:00
renovate[bot]
cdd9a09edc chore(deps): update dependency stakater/vale-package to v0.0.7 (#613)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-07 10:49:45 +01:00
stakater-user
c2cbca3f3c [skip-ci] Update artifacts 2024-02-07 09:39:50 +00:00
Benjamin Walterscheid
8a6395b18c Issue/600 - [BUG] Reloader don't restart pod on secret recreation (#610)
* issue/600 - removed invalid child element from Vanilla Manifest section

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/600 - correct table formats + lists

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/600 - replaced deprecated bases with resources for Kustomize resources

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/600 - enhanced parameter tables with default values + add default description for syncAfterRestart/reloadOnCreate

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

* issue/600 - reverted item change due to markdownlint-cli issues

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>

---------

Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>
Co-authored-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>
2024-02-07 10:33:55 +01:00
Benjamin Walterscheid
dbe44e173c issue/587 - removed helm labels and annotations for Kustomize builds
Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com>
2024-02-05 17:11:47 +01:00
t3mi
670b67dc55 feat(chart): add vpa support
Signed-off-by: t3mi <t3mi@users.noreply.github.com>
2024-02-05 11:51:33 +00:00
stakater-user
7acf5b88c3 [skip-ci] Update artifacts 2024-01-31 17:56:50 +00:00
Muneeb Aijaz
4d20963387 Merge pull request #609 from stakater/vale-package
Switch from submodule to Vale package for spell checking
2024-01-31 22:51:32 +05:00
Karl Johan Grahn
e9b09e7a68 update 2024-01-31 10:31:13 +01:00
Karl Johan Grahn
e78e7818d1 update 2024-01-31 10:22:00 +01:00
Karl Johan Grahn
ff12c58ee4 update 2024-01-31 10:19:35 +01:00
stakater-user
223ed538ae [skip-ci] Update artifacts 2024-01-31 09:08:33 +00:00
Muneeb Aijaz
49f8b9a612 Merge pull request #607 from stakater/renovate/github.com-argoproj-argo-rollouts-1.x
fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.5
2024-01-31 14:03:25 +05:00
Piotr Andrzejewski
989053888f Add missing condition in upgrade test 2024-01-26 12:53:43 +01:00
renovate[bot]
76ee7672c7 fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.5 2024-01-25 22:42:10 +00:00
Piotr Andrzejewski
bccefb1624 [#582] Allow to use auto annotation with specific resource type (configmap or secret) 2024-01-19 14:38:36 +01:00
stakater-user
6ccf555ee6 [skip-ci] Update artifacts 2024-01-17 09:44:01 +00:00
Bharath Nallapeta
1ff03aa764 Merge pull request #601 from stakater/renovate/golang-1.x
chore(deps): update golang docker tag to v1.21.6
2024-01-17 14:55:02 +05:30
renovate[bot]
e2b6ccd8ef chore(deps): update golang docker tag to v1.21.6 2024-01-10 14:28:33 +00:00
stakater-user
b0613884f0 [skip-ci] Update artifacts 2024-01-10 14:27:38 +00:00
Sanghamitra-PERSONAL
5551280554 Enabled the option to set user assigned affinity value (#596)
* Enabled the option to set user assigned affinity value

* Fixing the space

---------

Co-authored-by: Karl-Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com>
2024-01-10 15:22:23 +01:00
stakater-user
66ac979ea2 [skip-ci] Update artifacts 2024-01-10 14:15:07 +00:00
renovate[bot]
05f432469d chore(deps): update stakater/.github action to v0.0.62 (#602)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-10 15:10:16 +01:00
renovate[bot]
c845787c81 chore(deps): update stakater/.github action to v0.0.60 (#599)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-10 10:05:09 +01:00
stakater-user
308050e680 [skip-ci] Update artifacts 2024-01-03 11:46:52 +00:00
Bharath Nallapeta
09d6051a9a Merge pull request #598 from stakater/doc-linting
Markdownlinting update
2024-01-03 17:12:10 +05:30
Karl-Johan Grahn
0a5d1329bc Merge branch 'master' into doc-linting 2024-01-03 12:20:02 +01:00
stakater-user
6766fb47a0 [skip-ci] Update artifacts 2024-01-03 11:18:30 +00:00
Karl Johan Grahn
533b5ada08 Merge branch 'master' into doc-linting 2024-01-03 12:14:09 +01:00
renovate[bot]
479a5af9fa chore(deps): update stakater/.github action to v0.0.58 (#597)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 12:13:16 +01:00
Karl Johan Grahn
0b970fb10d update 2024-01-03 10:36:37 +01:00
stakater-user
1124d3614d [skip-ci] Update artifacts 2023-12-27 10:24:22 +00:00
Muneeb Aijaz
f67e5fb7e1 Merge pull request #473 from damslo/feature/ms-teams-webhook
Add MS Teams support for alerting webhook
2023-12-27 15:06:04 +05:00
Muneeb Aijaz
18bc739664 Merge branch 'master' into feature/ms-teams-webhook 2023-12-27 14:47:41 +05:00
stakater-user
f83959ffc1 [skip-ci] Update artifacts 2023-12-27 09:06:46 +00:00
Muneeb Aijaz
59ebab3b68 Merge branch 'master' into feature/ms-teams-webhook 2023-12-27 14:06:30 +05:00
Muneeb Aijaz
2218db6adf Merge pull request #592 from stakater/renovate/stakater-.github-0.x
chore(deps): update stakater/.github action to v0.0.54
2023-12-27 14:01:21 +05:00
renovate[bot]
86cc2fb905 chore(deps): update stakater/.github action to v0.0.54 2023-12-20 17:24:15 +00:00
stakater-user
9ef084e5cc [skip-ci] Update artifacts 2023-12-20 17:23:32 +00:00
Muneeb Aijaz
cbdf9ae077 Merge pull request #581 from stakater/renovate/golang-1.x
chore(deps): update golang docker tag to v1.21.5
2023-12-20 22:18:12 +05:00
renovate[bot]
b55929b645 chore(deps): update golang docker tag to v1.21.5 2023-12-20 09:27:32 +00:00
stakater-user
e4a7faa664 [skip-ci] Update artifacts 2023-12-20 09:26:33 +00:00
Muhammad Sheryar Butt
07ef2aaa12 Merge pull request #588 from stakater/renovate/stakater-.github-0.x
chore(deps): update stakater/.github action to v0.0.53
2023-12-20 14:21:55 +05:00
renovate[bot]
1d98ef0bfd chore(deps): update stakater/.github action to v0.0.53 2023-12-20 09:09:54 +00:00
Muhammad Sheryar Butt
3e0cd044ce Merge pull request #580 from stakater/renovate/github.com-argoproj-argo-rollouts-1.x
fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.4
2023-12-20 14:09:08 +05:00
renovate[bot]
eaf68d427e fix(deps): update module github.com/argoproj/argo-rollouts to v1.6.4 2023-12-13 09:34:18 +00:00
stakater-user
e1f4bf83af [skip-ci] Update artifacts 2023-12-13 09:33:21 +00:00
Muneeb Aijaz
3f0c824da5 Merge pull request #544 from gilles-gosuin/allow-arbitrary-volumes
Allow for arbitrary volumes
2023-12-13 14:28:43 +05:00
Muneeb Aijaz
b0cd335854 Merge branch 'master' into allow-arbitrary-volumes 2023-12-13 14:23:34 +05:00
stakater-user
6053e13681 [skip-ci] Update artifacts 2023-12-13 09:05:46 +00:00
Muneeb Aijaz
3201143c88 Merge pull request #583 from stakater/renovate/actions-setup-go-5.x
chore(deps): update actions/setup-go action to v5
2023-12-13 14:01:12 +05:00
renovate[bot]
376693ce02 chore(deps): update actions/setup-go action to v5 2023-12-08 13:37:44 +00:00
Karl-Johan Grahn
45fb35519f Merge branch 'master' into allow-arbitrary-volumes 2023-12-06 10:19:52 +01:00
Karl-Johan Grahn
357bc356f9 Merge branch 'master' into allow-arbitrary-volumes 2023-11-22 10:26:15 +01:00
Karl-Johan Grahn
539186f231 Merge branch 'master' into allow-arbitrary-volumes 2023-11-01 10:19:20 +01:00
Gilles Gosuin
54f2fdb708 Allow for arbitrary volumes 2023-10-11 14:37:36 +02:00
Damian Slowinski
78995cf451 update Readme 2023-06-06 16:15:39 +02:00
Damian Slowinski
daccf7e050 add Microsoft Teams webhook support 2023-06-06 15:55:01 +02:00
Damian Slowinski
330e69f417 add Microsoft Teams webhook support 2023-06-06 15:31:54 +02:00
55 changed files with 1369 additions and 400 deletions

View File

@@ -4,6 +4,15 @@ on:
pull_request_target:
branches:
- master
paths:
- '**'
- '!.markdownlint.yaml'
- '!.vale.ini'
- '!Dockerfile-docs'
- '!docs-nginx.conf'
- '!docs/**'
- '!theme_common'
- '!theme_override'
env:
DOCKER_FILE_PATH: Dockerfile
@@ -14,10 +23,10 @@ env:
jobs:
qa:
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.52
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.82
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: README.md docs
DOC_SRC: README.md
MD_LINT_CONFIG: .markdownlint.yaml
build:
runs-on: ubuntu-latest
@@ -31,7 +40,7 @@ jobs:
# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
- name: Helm chart unit tests
uses: d3adb5/helm-unittest-action@v2
@@ -39,7 +48,7 @@ jobs:
charts: deployments/kubernetes/chart/reloader
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
@@ -50,7 +59,7 @@ jobs:
make install
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v5
with:
version: latest
only-new-issues: false

View File

@@ -0,0 +1,31 @@
name: Pull Request for Documentation Changes
on:
pull_request_target:
branches:
- master
paths:
- '.markdownlint.yaml'
- '.vale.ini'
- 'Dockerfile-docs'
- 'docs-nginx.conf'
- 'docs/**'
- 'theme_common'
- 'theme_override'
jobs:
qa:
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.82
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: docs
MD_LINT_CONFIG: .markdownlint.yaml
build:
uses: stakater/.github/.github/workflows/pull_request_container_build.yaml@v0.0.82
with:
DOCKER_FILE_PATH: Dockerfile-docs
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

View File

@@ -4,6 +4,15 @@ on:
push:
branches:
- master
paths:
- '**'
- '!.markdownlint.yaml'
- '!.vale.ini'
- '!Dockerfile-docs'
- '!docs-nginx.conf'
- '!docs/**'
- '!theme_common'
- '!theme_override'
env:
DOCKER_FILE_PATH: Dockerfile
@@ -23,28 +32,28 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
with:
version: v3.11.3
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Install Dependencies
run: |
make install
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v5
with:
version: latest
only-new-issues: false
@@ -74,7 +83,7 @@ jobs:
- name: Generate Tag
id: generate_tag
uses: anothrNick/github-tag-action@1.67.0
uses: anothrNick/github-tag-action@1.69.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: true
@@ -187,7 +196,7 @@ jobs:
# Generate tag for operator without "v"
- name: Generate Operator Tag
id: generate_operator_tag
uses: anothrNick/github-tag-action@1.67.0
uses: anothrNick/github-tag-action@1.69.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: false
@@ -202,9 +211,17 @@ jobs:
- name: Helm Template
run: |
helm template reloader deployments/kubernetes/chart/reloader/ > deployments/kubernetes/reloader.yaml
helm template reloader deployments/kubernetes/chart/reloader/ \
--set reloader.deployment.resources.limits.cpu=150m \
--set reloader.deployment.resources.limits.memory=512Mi \
--set reloader.deployment.resources.requests.cpu=10m \
--set reloader.deployment.resources.requests.memory=128Mi > deployments/kubernetes/reloader.yaml
helm template reloader deployments/kubernetes/chart/reloader/ --output-dir deployments/kubernetes/manifests && mv deployments/kubernetes/manifests/reloader/templates/* deployments/kubernetes/manifests/ && rm -r deployments/kubernetes/manifests/reloader
- name: Remove labels and annotations from manifests
run: make remove-labels-annotations
# Publish helm chart
- name: Login to ghcr via helm
run: |
@@ -230,7 +247,6 @@ jobs:
commit_username: stakater-user
commit_email: stakater@gmail.com
# Commit back changes
- name: Log info about `.git` directory permissions
run: |
@@ -256,7 +272,7 @@ jobs:
branch: ${{ github.ref }}
- name: Push Latest Tag
uses: anothrNick/github-tag-action@1.67.0
uses: anothrNick/github-tag-action@1.69.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: true

28
.github/workflows/push_docs.yaml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Push Documentation Changes
on:
push:
branches:
- master
paths:
- '.markdownlint.yaml'
- '.vale.ini'
- 'Dockerfile-docs'
- 'docs-nginx.conf'
- 'docs/**'
- 'README.md'
- 'theme_common'
- 'theme_override'
jobs:
push:
uses: stakater/.github/.github/workflows/push_container.yaml@v0.0.82
with:
DOCKER_FILE_PATH: Dockerfile-docs
RELEASE_BRANCH: master
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
GH_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}

View File

@@ -17,7 +17,7 @@ jobs:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
@@ -27,7 +27,7 @@ jobs:
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}

6
.gitignore vendored
View File

@@ -11,4 +11,8 @@ vendor
dist
Reloader
!**/chart/reloader
*.tgz
*.tgz
styles/
site/
/mkdocs.yml
yq

6
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "vocabulary"]
path = vocabulary
url = git@github.com:stakater/vocabulary.git
[submodule "theme_common"]
path = theme_common
url = https://github.com/stakater/stakater-docs-mkdocs-theme.git

View File

@@ -10,6 +10,7 @@ builds:
- amd64
- arm
- arm64
- ppc64le
archives:
- name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
snapshot:

View File

@@ -1,7 +1,8 @@
StylesPath = "vocabulary/styles"
StylesPath = styles
MinAlertLevel = warning
Vocab = "Stakater"
Packages = https://github.com/stakater/vale-package/releases/download/v0.0.27/Stakater.zip
Vocab = Stakater
# Only check MarkDown files
[*.md]

3
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,3 @@
# Code of Conduct
Reloader follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

View File

@@ -2,7 +2,7 @@ ARG BUILDER_IMAGE
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE:-golang:1.21.4} as builder
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE:-golang:1.21.9} as builder
ARG TARGETOS
ARG TARGETARCH

35
Dockerfile-docs Normal file
View File

@@ -0,0 +1,35 @@
FROM python:3.12 as builder
# set workdir
RUN mkdir -p $HOME/application
WORKDIR $HOME/application
# copy the entire application
COPY --chown=1001:root . .
RUN pip3 install -r theme_common/requirements.txt
# Combine Theme Resources
RUN python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
# Produce mkdocs file
RUN python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
# build the docs
RUN mkdocs build
FROM nginxinc/nginx-unprivileged:1.27-alpine as deploy
COPY --from=builder $HOME/application/site/ /usr/share/nginx/html/reloader/
COPY docs-nginx.conf /etc/nginx/conf.d/default.conf
# set non-root user
USER 1001
LABEL name="Stakater Reloader Documentation" \
maintainer="Stakater <hello@stakater.com>" \
vendor="Stakater" \
release="1" \
summary="Documentation for Stakater Reloader"
EXPOSE 8080:8080/tcp
CMD ["nginx", "-g", "daemon off;"]

5
MAINTAINERS Normal file
View File

@@ -0,0 +1,5 @@
Bharath Nallapeta <bharath.nallapeta@stakater.com> (@bnallapeta)
Karl Johan Grahn <karl.johan@stakater.com> (@karl-johan-grahn)
Muhammad Sheryar Butt <sheryar@stakater.com> (@SheryarButt)
Muneeb Aijaz <muneeb@stakater.com> (@MuneebAijaz)
Tanveer Alam <tanveer.alam@stakater.com> (@tanalam2411)

View File

@@ -86,3 +86,25 @@ bump-chart:
sed -i "s/^appVersion:.*/appVersion: v$(VERSION)/" deployments/kubernetes/chart/reloader/Chart.yaml
sed -i "s/tag:.*/tag: v$(VERSION)/" deployments/kubernetes/chart/reloader/values.yaml
sed -i "s/version:.*/version: v$(VERSION)/" deployments/kubernetes/chart/reloader/values.yaml
YQ_VERSION = v4.42.1
YQ_BIN = $(shell pwd)/yq
CURRENT_ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
YQ_DOWNLOAD_URL = "https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_linux_$(CURRENT_ARCH)"
yq-install:
@echo "Downloading yq $(YQ_VERSION) for linux/$(CURRENT_ARCH)"
@curl -sL $(YQ_DOWNLOAD_URL) -o $(YQ_BIN)
@chmod +x $(YQ_BIN)
@echo "yq $(YQ_VERSION) installed at $(YQ_BIN)"
remove-labels-annotations: yq-install
@for file in $$(find deployments/kubernetes/manifests -type f -name '*.yaml'); do \
echo "Processing $$file"; \
$(YQ_BIN) eval 'del(.metadata.labels, .metadata.annotations)' -i "$$file"; \
done
$(YQ_BIN) eval 'del(.spec.template.metadata.labels)' -i deployments/kubernetes/manifests/deployment.yaml
$(YQ_BIN) eval 'del(.spec.selector.matchLabels)' -i deployments/kubernetes/manifests/deployment.yaml
$(YQ_BIN) eval '.spec.selector.matchLabels.app = "reloader-reloader"' -i deployments/kubernetes/manifests/deployment.yaml
$(YQ_BIN) eval '.spec.template.metadata.labels.app = "reloader-reloader"' -i deployments/kubernetes/manifests/deployment.yaml

163
README.md
View File

@@ -49,7 +49,9 @@ spec:
This will discover deploymentconfigs/deployments/daemonsets/statefulset/rollouts automatically where `foo-configmap` or `foo-secret` is being used either via environment variable or from volume mount. And it will perform rolling upgrade on related pods when `foo-configmap` or `foo-secret`are updated.
You can restrict this discovery to only `ConfigMap` or `Secret` objects that
You can filter it by the type of monitored resource and use typed versions of `auto` annotation. If you want to discover changes only in mounted `Secret`s and ignore changes in `ConfigMap`s, add `secret.reloader.stakater.com/auto` annotation instead. Analogously, you can use `configmap.reloader.stakater.com/auto` annotation to look for changes in mounted `ConfigMap`, changes in any of mounted `Secret`s will not trigger a rolling upgrade on related pods.
You can also restrict this discovery to only `ConfigMap` or `Secret` objects that
are tagged with a special annotation. To take advantage of that, annotate
your deploymentconfigs/deployments/daemonsets/statefulset/rollouts like this:
@@ -84,11 +86,13 @@ will always restart upon a change in configmaps or secrets it uses, regardless
of whether they have the `reloader.stakater.com/match: "true"` annotation or
not.
Similarly, `reloader.stakater.com/auto` and its typed version (`secret.reloader.stakater.com/auto` or `configmap.reloader.stakater.com/auto`) do not work together. If you have both annotations in your deployment, then only one of them needs to be true to trigger the restart. For example, having both `reloader.stakater.com/auto: "true"` and `secret.reloader.stakater.com/auto: "false"` or both `reloader.stakater.com/auto: "false"` and `secret.reloader.stakater.com/auto: "true"` will restart upon a change in a secret it uses.
We can also specify a specific configmap or secret which would trigger rolling upgrade only upon change in our specified configmap or secret, this way, it will not trigger rolling upgrade upon changes in all configmaps or secrets used in a `deploymentconfig`, `deployment`, `daemonset`, `statefulset` or `rollout`.
To do this either set the auto annotation to `"false"` (`reloader.stakater.com/auto: "false"`) or remove it altogether, and use annotations for [Configmap](.#Configmap) or [Secret](.#Secret).
It's also possible to enable auto reloading for all resources, by setting the `--auto-reload-all` flag.
In this case, all resources that do not have the auto annotation set to `"false"`, will be reloaded automatically when their ConfigMaps or Secrets are updated.
In this case, all resources that do not have the auto annotation (or its typed version) set to `"false"`, will be reloaded automatically when their ConfigMaps or Secrets are updated.
Notice that setting the auto annotation to an undefined value counts as false as-well.
### Configmap
@@ -154,6 +158,8 @@ spec:
- `reloader.stakater.com/auto: "true"` will only reload the pod, if the configmap or secret is used (as a volume mount or as an env) in `DeploymentConfigs/Deployment/Daemonsets/Statefulsets`
- `secret.reloader.stakater.com/reload` or `configmap.reloader.stakater.com/reload` annotation will reload the pod upon changes in specified configmap or secret, irrespective of the usage of configmap or secret.
- you may override the auto annotation with the `--auto-annotation` flag
- you may override the secret typed auto annotation with the `--secret-auto-annotation` flag
- you may override the configmap typed auto annotation with the `--configmap-auto-annotation` flag
- you may override the search annotation with the `--auto-search-annotation` flag
and the match annotation with the `--search-match-annotation` flag
- you may override the configmap annotation with the `--configmap-annotation` flag
@@ -184,12 +190,22 @@ You can apply vanilla manifests by changing `RELEASE-NAME` placeholder provided
kubectl apply -f https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml
```
By default, Reloader gets deployed in `default` namespace and watches changes `secrets` and `configmaps` in all namespaces.
By default, Reloader gets deployed in `default` namespace and watches changes `secrets` and `configmaps` in all namespaces.Additionally, in the default Reloader deployment, the following resource limits and requests are set:
```yaml
resources:
limits:
cpu: 150m
memory: 512Mi
requests:
cpu: 10m
memory: 128Mi
```
Reloader can be configured to ignore the resources `secrets` and `configmaps` by passing the following arguments (`spec.template.spec.containers.args`) to its container :
| Argument | Description |
| -------------------------------- | -------------------- |
|----------------------------------|----------------------|
| --resources-to-ignore=configMaps | To ignore configMaps |
| --resources-to-ignore=secrets | To ignore secrets |
@@ -199,7 +215,7 @@ Reloader can be configured to only watch secrets/configmaps with one or more lab
**Note:** The old `:` delimited key value mappings are deprecated and if provided will be translated to `key=value`. Likewise, if a wildcard value is provided (e.g. `key:*`) it will be translated to the standalone `key` which checks for key existence.
These selectors can be combined together, for example with:
These selectors can be combined, for example with:
```yaml
--resource-label-selector=reloader=enabled,key-exists,another-label in (value1,value2,value3)
@@ -211,20 +227,17 @@ Only configmaps or secrets labeled like the following will be watched:
kind: ConfigMap
apiVersion: v1
metadata:
...
labels:
reloader: enabled
key-exists: yes
another-label: value1
...
```
Reloader can be configured to only watch namespaces labeled with one or more labels using the `--namespace-selector` parameter. Supported operators are `!, in, notin, ==, =, !=`, if no operator is found the 'exists' operator is inferred (i.e. key only). Additional examples of these selectors can be found in the [Kubernetes Docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors).
**Note:** The old `:` delimited key value mappings are deprecated and if provided will be translated to `key=value`. Likewise, if a wildcard value is provided (e.g. `key:*`) it will be translated to the standalone `key` which checks for key existence.
These selectors can be combined together, for example with:
These selectors can be combined, for example with:
```yaml
--namespace-selector=reloader=enabled,test=true
@@ -236,11 +249,9 @@ Only namespaces labeled as below would be watched and eligible for reloads:
kind: Namespace
apiVersion: v1
metadata:
...
labels:
reloader: enabled
test: true
...
```
### Vanilla Kustomize
@@ -261,7 +272,7 @@ You can write your own `kustomization.yaml` using ours as a 'base' and write pat
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
resources:
- https://github.com/stakater/Reloader/deployments/kubernetes
namespace: reloader
@@ -271,67 +282,117 @@ namespace: reloader
Alternatively if you have configured helm on your cluster, you can add Reloader to helm from our public chart repository and deploy it via helm using below-mentioned commands. Follow [this](docs/Helm2-to-Helm3.md) guide, in case you have trouble migrating Reloader from Helm2 to Helm3.
#### Installation
```bash
helm repo add stakater https://stakater.github.io/stakater-charts
helm repo update
helm install stakater/reloader # For helm3 add --generate-name flag or set the release name
helm install {{RELEASE_NAME}} stakater/reloader -n {{NAMESPACE}} --set reloader.watchGlobally=false # By default, Reloader watches in all namespaces. To watch in single namespace, set watchGlobally=false
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test --generate-name # Install Reloader in `test` namespace which will only watch `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
```
**Note:** By default Reloader watches in all namespaces. To watch in single namespace, please run following command. It will install Reloader in `test` namespace which will only watch `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
#### Uninstalling
```bash
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test # For helm3 add --generate-name flag or set the release name
helm uninstall {{RELEASE_NAME}} -n {{NAMESPACE}}
```
Reloader can be configured to ignore the resources `secrets` and `configmaps` by using the following parameters of `values.yaml` file:
### Parameters
| Parameter | Description | Type |
| ---------------- | -------------------------------------------------------------- | ------- |
| ignoreSecrets | To ignore secrets. Valid value are either `true` or `false` | boolean |
| ignoreConfigMaps | To ignore configMaps. Valid value are either `true` or `false` | boolean |
#### Global Parameters
**Note:** At one time only one of these resource can be ignored, trying to do it will cause error in helm template compilation.
| Parameter | Description | Type | Default |
|---------------------------|-----------------------------------------------------------------|-------|---------|
| `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | array | `[]` |
Reloader can be configured to only watch namespaces labeled with one or more labels using the `namespaceSelector` parameter
#### Common Parameters
| Parameter | Description | Type |
| ---------------- | ---------------------------------------------------------------------------------- | ------- |
| namespaceSelector | list of comma separated label selectors, if multiple are provided they are combined with the AND operator | string |
| Parameter | Description | Type | Default |
|--------------------|-------------------------------|--------|---------|
| `nameOverride` | replace the name of the chart | string | `""` |
| `fullnameOverride` | replace the generated name | string | `""` |
Reloader can be configured to only watch configmaps/secrets labeled with one or more labels using the `resourceLabelSelector` parameter
#### Core Reloader Parameters
| Parameter | Description | Type |
| ---------------------- | ---------------------------------------------------------------------------------- | ------- |
| resourceLabelSelector | list of comma separated label selectors, if multiple are provided they are combined with the AND operator | string |
| Parameter | Description | Type | Default |
|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------|
| `reloader.autoReloadAll` | | boolean | `false` |
| `reloader.isArgoRollouts` | Enable Argo `Rollouts`. Valid value are either `true` or `false` | boolean | `false` |
| `reloader.isOpenshift` | Enable OpenShift DeploymentConfigs. Valid value are either `true` or `false` | boolean | `false` |
| `reloader.ignoreSecrets` | To ignore secrets. Valid value are either `true` or `false`. Either `ignoreSecrets` or `ignoreConfigMaps` can be ignored, not both at the same time | boolean | `false` |
| `reloader.ignoreConfigMaps` | To ignore configMaps. Valid value are either `true` or `false` | boolean | `false` |
| `reloader.reloadOnCreate` | Enable reload on create events. Valid value are either `true` or `false` | boolean | `false` |
| `reloader.syncAfterRestart` | Enable sync after Reloader restarts for **Add** events, works only when reloadOnCreate is `true`. Valid value are either `true` or `false` | boolean | `false` |
| `reloader.reloadStrategy` | Strategy to trigger resource restart, set to either `default`, `env-vars` or `annotations` | enumeration | `default` |
| `reloader.ignoreNamespaces` | List of comma separated namespaces to ignore, if multiple are provided, they are combined with the AND operator | string | `""` |
| `reloader.namespaceSelector` | List of comma separated namespaces to select, if multiple are provided, they are combined with the AND operator | string | `""` |
| `reloader.resourceLabelSelector` | List of comma separated label selectors, if multiple are provided they are combined with the AND operator | string | `""` |
| `reloader.logFormat` | Set type of log format. Value could be either `json` or `""` | string | `""` |
| `reloader.watchGlobally` | Allow Reloader to watch in all namespaces (`true`) or just in a single namespace (`false`) | boolean | `true` |
| `reloader.enableHA` | Enable leadership election allowing you to run multiple replicas | boolean | `false` |
| `reloader.readOnlyRootFileSystem` | Enforce readOnlyRootFilesystem | boolean | `false` |
| `reloader.legacy.rbac` | | boolean | `false` |
| `reloader.matchLabels` | Pod labels to match | map | `{}` |
| `reloader.enableMetricsByNamespace` | Expose an additional Prometheus counter of reloads by namespace (this metric may have high cardinality in clusters with many namespaces) | boolean | `false` |
**Note:** Both `namespaceSelector` & `resourceLabelSelector` can be used together. If they are then both conditions must be met for the configmap or secret to be eligible to trigger reload events. (e.g. If a configMap matches `resourceLabelSelector` but `namespaceSelector` does not match the namespace the configmap is in, it will be ignored).
#### Deployment Reloader Parameters
You can also set the log format of Reloader to json by setting `logFormat` to `json` in values.yaml and apply the chart.
| Parameter | Description | Type | Default |
|-------------------------------------------------|-----------------------------------------------------------------------------------------|--------|-------------------|
| `reloader.deployment.replicas` | Number of replicas, if you wish to run multiple replicas set `reloader.enableHA = true` | int | 1 |
| `reloader.deployment.revisionHistoryLimit` | Limit the number of revisions retained in the revision history | int | 2 |
| `reloader.deployment.nodeSelector` | Scheduling pod to a specific node based on set labels | map | `{}` |
| `reloader.deployment.affinity` | Set affinity rules on pod | map | `{}` |
| `reloader.deployment.securityContext` | Set pod security context | map | `{}` |
| `reloader.deployment.containerSecurityContext` | Set container security context | map | `{}` |
| `reloader.deployment.tolerations` | A list of `tolerations` to be applied to the deployment | array | `[]` |
| `reloader.deployment.topologySpreadConstraints` | Topology spread constraints for pod assignment | array | `[]` |
| `reloader.deployment.annotations` | Set deployment annotations | map | `{}` |
| `reloader.deployment.labels` | Set deployment labels, default to stakater settings | array | `see values.yaml` |
| `reloader.deployment.image` | Set container image name, tag and policy | array | `see values.yaml` |
| `reloader.deployment.env` | Support for extra environment variables | array | `[]` |
| `reloader.deployment.livenessProbe` | Set liveness probe timeout values | map | `{}` |
| `reloader.deployment.readinessProbe` | Set readiness probe timeout values | map | `{}` |
| `reloader.deployment.resources` | Set container requests and limits (e.g. CPU or memory) | map | `{}` |
| `reloader.deployment.pod.annotations` | Set annotations for pod | map | `{}` |
| `reloader.deployment.priorityClassName` | Set priority class for pod in cluster | string | `""` |
You can enable to scrape Reloader's Prometheus metrics by setting `serviceMonitor.enabled` or `podMonitor.enabled` to `true` in values.yaml file. Service monitor will be removed in future releases of Reloader in favour of Pod monitor.
#### Other Reloader Parameters
**Note:** Reloading of OpenShift (DeploymentConfig) and/or Argo `Rollouts` has to be enabled explicitly because it might not be always possible to use it on a cluster with restricted permissions. This can be done by changing the following parameters:
| Parameter | Description | Type | Default |
|----------------------------------------|-----------------------------------------------------------------|---------|---------|
| `reloader.service` | | map | `{}` |
| `reloader.rbac.enabled` | Specifies whether a role based access control should be created | boolean | `true` |
| `reloader.serviceAccount.create` | Specifies whether a ServiceAccount should be created | boolean | `true` |
| `reloader.custom_annotations` | Add custom annotations | map | `{}` |
| `reloader.serviceMonitor.enabled` | Enable to scrape Reloader's Prometheus metrics (legacy) | boolean | `false` |
| `reloader.podMonitor.enabled` | Enable to scrape Reloader's Prometheus metrics | boolean | `false` |
| `reloader.podDisruptionBudget.enabled` | Limit the number of pods of a replicated application | boolean | `false` |
| `reloader.netpol.enabled` | | boolean | `false` |
| `reloader.volumeMounts` | Mount volume | array | `[]` |
| `reloader.volumes` | Add volume to a pod | array | `[]` |
| `reloader.webhookUrl` | Add webhook to Reloader | string | `""` |
| Parameter | Description | Type |
|------------------|------------------------------------------------------------------------------------------------------------------------------------------| ------- |
| isOpenshift | Enable OpenShift DeploymentConfigs. Valid value are either `true` or `false` | boolean |
| isArgoRollouts | Enable Argo `Rollouts`. Valid value are either `true` or `false` | boolean |
| reloadOnCreate | Enable reload on create events. Valid value are either `true` or `false` | boolean |
| syncAfterRestart | Enable sync after Reloader restarts for **Add** events, works only when reloadOnCreate is `true`. Valid value are either `true` or `false` | boolean |
#### Additional Remarks
**isOpenShift** Recent versions of OpenShift (tested on 4.13.3) require the specified user to be in an uid range which is dynamically assigned by the namespace. The solution is to unset the runAsUser variable via ``deployment.securityContext.runAsUser=null`` and let OpenShift assign it at install.
**ReloadOnCreate** reloadOnCreate controls how Reloader handles secrets being added to the cache for the first time. If reloadOnCreate is set to true:
- Configmaps/secrets being added to the cache will cause Reloader to perform a rolling update of the associated workload.
- When applications are deployed for the first time, Reloader will perform a rolling update of the associated workload.
- If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected.
If ReloadOnCreate is set to false:
- Updates to configMaps/Secrets that occur while there is no leader will not be picked up by the new leader until a subsequent update of the configmap/secret occurs. In the worst case the window in which there can be no leader is 15s as this is the LeaseDuration.
- Both `namespaceSelector` & `resourceLabelSelector` can be used together. If they are then both conditions must be met for the configmap or secret to be eligible to trigger reload events. (e.g. If a configMap matches `resourceLabelSelector` but `namespaceSelector` does not match the namespace the configmap is in, it will be ignored).
- At one time only one of the resources `ignoreConfigMaps` or `ignoreSecrets` can be ignored, trying to do both will cause error in helm template compilation
- Reloading of OpenShift (DeploymentConfig) and/or Argo `Rollouts` has to be enabled explicitly because it might not be always possible to use it on a cluster with restricted permissions
- `isOpenShift` Recent versions of OpenShift (tested on 4.13.3) require the specified user to be in an `uid` range which is dynamically assigned by the namespace. The solution is to unset the runAsUser variable via ``deployment.securityContext.runAsUser=null`` and let OpenShift assign it at install
- `reloadOnCreate` controls how Reloader handles secrets being added to the cache for the first time. If `reloadOnCreate` is set to true:
1. Configmaps/secrets being added to the cache will cause Reloader to perform a rolling update of the associated workload
1. When applications are deployed for the first time, Reloader will perform a rolling update of the associated workload
1. If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected
- `serviceMonitor` will be removed in future releases of Reloader in favour of Pod monitor
- If `reloadOnCreate` is set to false:
1. Updates to configmaps/secrets that occur while there is no leader will not be picked up by the new leader until a subsequent update of the configmap/secret occurs
1. In the worst case the window in which there can be no leader is 15s as this is the LeaseDuration
- By default, `reloadOnCreate` and `syncAfterRestart` are both set to false. Both need to be enabled explicitly
## Help
@@ -347,7 +408,7 @@ File a GitHub [issue](https://github.com/stakater/Reloader/issues).
Join and talk to us on Slack for discussing Reloader
[![Join Slack](https://stakater.github.io/README/stakater-join-slack-btn.png)](https://slack.stakater.com/)
[![Join Slack](https://stakater.github.io/README/stakater-join-slack-btn.png)](https://stakater.slack.com/)
[![Chat](https://stakater.github.io/README/stakater-chat-btn.png)](https://stakater-community.slack.com/messages/CC5S05S12)
## Contributing
@@ -360,7 +421,7 @@ Please use the [issue tracker](https://github.com/stakater/Reloader/issues) to r
1. Deploy Reloader.
1. Run `okteto up` to activate your development container.
1. `make build`.
1. `make build`
1. `./Reloader`
PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.

View File

@@ -3,8 +3,8 @@
apiVersion: v1
name: reloader
description: Reloader chart that runs on kubernetes
version: 1.0.52
appVersion: v1.0.52
version: v1.0.112
appVersion: vv1.0.112
keywords:
- Reloader
- kubernetes

View File

@@ -57,8 +57,9 @@ spec:
affinity:
{{- if .Values.reloader.deployment.affinity }}
{{ toYaml .Values.reloader.deployment.affinity | indent 8 }}
{{- end}}
{{- else }}
{{ include "reloader-podAntiAffinity" . | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.reloader.deployment.tolerations }}
tolerations:
@@ -75,7 +76,7 @@ spec:
- image: "{{ .Values.reloader.deployment.image.name }}:{{ .Values.reloader.deployment.image.tag }}"
imagePullPolicy: {{ .Values.reloader.deployment.image.pullPolicy }}
name: {{ template "reloader-fullname" . }}
{{- if or (.Values.reloader.deployment.env.open) (.Values.reloader.deployment.env.secret) (.Values.reloader.deployment.env.field) (.Values.reloader.deployment.env.existing) (eq .Values.reloader.watchGlobally false) (.Values.reloader.enableHA)}}
{{- if or (.Values.reloader.deployment.env.open) (.Values.reloader.deployment.env.secret) (.Values.reloader.deployment.env.field) (.Values.reloader.deployment.env.existing) (eq .Values.reloader.watchGlobally false) (.Values.reloader.enableHA) (.Values.reloader.enableMetricsByNamespace)}}
env:
{{- range $name, $value := .Values.reloader.deployment.env.open }}
{{- if not (empty $value) }}
@@ -128,6 +129,10 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
{{- if .Values.reloader.enableMetricsByNamespace }}
- name: METRICS_COUNT_BY_NAMESPACE
value: enabled
{{- end }}
{{- end }}
ports:
@@ -160,10 +165,15 @@ spec:
securityContext:
{{- toYaml $containerSecurityContext | nindent 10 }}
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
{{- if (or (.Values.reloader.deployment.volumeMounts) (eq .Values.reloader.readOnlyRootFileSystem true)) }}
volumeMounts:
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
- mountPath: /tmp/
name: tmp-volume
{{- end }}
{{- with .Values.reloader.deployment.volumeMounts }}
{{- . | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- if or (.Values.reloader.logFormat) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}}
args:
@@ -198,6 +208,14 @@ spec:
- "--auto-annotation"
- "{{ .Values.reloader.custom_annotations.auto }}"
{{- end }}
{{- if .Values.reloader.custom_annotations.secret_auto }}
- "--secret-auto-annotation"
- "{{ .Values.reloader.custom_annotations.secret_auto }}"
{{- end }}
{{- if .Values.reloader.custom_annotations.configmap_auto }}
- "--configmap-auto-annotation"
- "{{ .Values.reloader.custom_annotations.configmap_auto }}"
{{- end }}
{{- if .Values.reloader.custom_annotations.search }}
- "--auto-search-annotation"
- "{{ .Values.reloader.custom_annotations.search }}"
@@ -241,8 +259,13 @@ spec:
{{- if hasKey .Values.reloader.deployment "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.reloader.deployment.automountServiceAccountToken }}
{{- end }}
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
{{- if (or (.Values.reloader.deployment.volumes) (eq .Values.reloader.readOnlyRootFileSystem true)) }}
volumes:
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
- emptyDir: {}
name: tmp-volume
{{- end }}
{{- with .Values.reloader.deployment.volumes }}
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -10,6 +10,7 @@ metadata:
{{ toYaml .Values.reloader.matchLabels | indent 4 }}
{{- end }}
name: {{ template "reloader-fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
spec:
podSelector:
matchLabels:

View File

@@ -3,6 +3,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "reloader-fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
spec:
minAvailable: {{ .Values.reloader.podDisruptionBudget.minAvailable }}
selector:

View File

@@ -14,6 +14,8 @@ metadata:
name: {{ template "reloader-fullname" . }}
{{- if .Values.reloader.podMonitor.namespace }}
namespace: {{ tpl .Values.reloader.podMonitor.namespace . }}
{{- else }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
{{- end }}
spec:
podMetricsEndpoints:

View File

@@ -14,6 +14,8 @@ metadata:
name: {{ template "reloader-fullname" . }}
{{- if .Values.reloader.serviceMonitor.namespace }}
namespace: {{ tpl .Values.reloader.serviceMonitor.namespace . }}
{{- else }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
{{- end }}
spec:
endpoints:

View File

@@ -0,0 +1,40 @@
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.reloader.verticalPodAutoscaler.enabled) }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ template "reloader-fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "reloader-labels.chart" . | nindent 4 }}
spec:
{{- with .Values.reloader.verticalPodAutoscaler.recommenders }}
recommenders:
{{- toYaml . | nindent 4 }}
{{- end }}
resourcePolicy:
containerPolicies:
- containerName: {{ template "reloader-fullname" . }}
{{- with .Values.reloader.verticalPodAutoscaler.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.reloader.verticalPodAutoscaler.controlledValues }}
controlledValues: {{ .Values.reloader.verticalPodAutoscaler.controlledValues }}
{{- end }}
{{- if .Values.reloader.verticalPodAutoscaler.maxAllowed }}
maxAllowed:
{{ toYaml .Values.reloader.verticalPodAutoscaler.maxAllowed | nindent 8 }}
{{- end }}
{{- if .Values.reloader.verticalPodAutoscaler.minAllowed }}
minAllowed:
{{ toYaml .Values.reloader.verticalPodAutoscaler.minAllowed | nindent 8 }}
{{- end }}
targetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "reloader-fullname" . }}
{{- with .Values.reloader.verticalPodAutoscaler.updatePolicy }}
updatePolicy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -32,6 +32,8 @@ reloader:
legacy:
rbac: false
matchLabels: {}
# Set to true to expose a prometheus counter of reloads by namespace (this metric may have high cardinality in clusters with many namespaces)
enableMetricsByNamespace: false
deployment:
# If you wish to run multiple replicas set reloader.enableHA = true
replicas: 1
@@ -55,6 +57,8 @@ reloader:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
containerSecurityContext: {}
# capabilities:
@@ -87,10 +91,10 @@ reloader:
labels:
provider: stakater
group: com.stakater.platform
version: v1.0.52
version: vv1.0.112
image:
name: ghcr.io/stakater/reloader
tag: v1.0.52
tag: vv1.0.112
pullPolicy: IfNotPresent
# Support for extra environment variables.
env:
@@ -280,5 +284,40 @@ reloader:
# matchLabels:
# app.kubernetes.io/name: prometheus
to: []
# Enable vertical pod autoscaler
verticalPodAutoscaler:
enabled: false
# Recommender responsible for generating recommendation for the object.
# List should be empty (then the default recommender will generate the recommendation)
# or contain exactly one recommender.
# recommenders:
# - name: custom-recommender-performance
# List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
controlledResources: []
# Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
# controlledValues: RequestsAndLimits
# Define the max allowed resources for the pod
maxAllowed: {}
# cpu: 200m
# memory: 100Mi
# Define the min allowed resources for the pod
minAllowed: {}
# cpu: 200m
# memory: 100Mi
updatePolicy:
# Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
# minReplicas: 1
# Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
# are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
updateMode: Auto
volumeMounts: []
volumes: []
webhookUrl: ""

View File

@@ -1,18 +1,8 @@
---
# Source: reloader/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
name: reloader-reloader-role
rules:
- apiGroups:

View File

@@ -1,18 +1,8 @@
---
# Source: reloader/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
name: reloader-reloader-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io

View File

@@ -3,18 +3,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.52
name: reloader-reloader
namespace: default
spec:
@@ -23,49 +11,40 @@ spec:
selector:
matchLabels:
app: reloader-reloader
release: "reloader"
template:
metadata:
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.52
spec:
containers:
- image: "ghcr.io/stakater/reloader:v1.0.52"
imagePullPolicy: IfNotPresent
name: reloader-reloader
ports:
- name: http
containerPort: 9090
livenessProbe:
httpGet:
path: /live
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /metrics
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
securityContext:
{}
securityContext:
- image: "ghcr.io/stakater/reloader:vv1.0.112"
imagePullPolicy: IfNotPresent
name: reloader-reloader
ports:
- name: http
containerPort: 9090
livenessProbe:
httpGet:
path: /live
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /metrics
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
securityContext: {}
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: reloader-reloader

View File

@@ -3,14 +3,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
name: reloader-reloader
namespace: default

View File

@@ -8,7 +8,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
chart: "reloader-v1.0.112"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
@@ -25,7 +25,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
chart: "reloader-v1.0.112"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
@@ -92,7 +92,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
chart: "reloader-v1.0.112"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
@@ -115,13 +115,13 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
chart: "reloader-v1.0.112"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.52
version: vv1.0.112
name: reloader-reloader
namespace: default
spec:
@@ -135,16 +135,16 @@ spec:
metadata:
labels:
app: reloader-reloader
chart: "reloader-1.0.52"
chart: "reloader-v1.0.112"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.52
version: vv1.0.112
spec:
containers:
- image: "ghcr.io/stakater/reloader:v1.0.52"
- image: "ghcr.io/stakater/reloader:vv1.0.112"
imagePullPolicy: IfNotPresent
name: reloader-reloader
@@ -172,7 +172,16 @@ spec:
securityContext:
{}
resources:
limits:
cpu: 150m
memory: 512Mi
requests:
cpu: 10m
memory: 128Mi
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: reloader-reloader

View File

@@ -23,6 +23,8 @@ reloader:
legacy:
rbac: false
matchLabels: {}
# Set to true to expose a prometheus counter of reloads by namespace (this metric may have high cardinality in clusters with many namespaces)
enableMetricsByNamespace: false
deployment:
replicas: 1
nodeSelector:

11
docs-nginx.conf Normal file
View File

@@ -0,0 +1,11 @@
server {
listen 8080;
root /usr/share/nginx/html/;
index index.html;
error_page 403 404 /404.html;
location = /404.html {
internal;
}
# redirects issued by nginx will be relative
absolute_redirect off;
}

View File

@@ -2,17 +2,17 @@
Reloader can alert when it triggers a rolling upgrade on Deployments or StatefulSets. Webhook notification alert would be sent to the configured webhook server with all the required information.
## Enabling the feature
## Enabling
In-order to enable this feature, you need to update the `reloader.env.secret` section of values.yaml providing the information needed for alert.
In-order to enable this feature, you need to update the `reloader.env.secret` section of `values.yaml` providing the information needed for alert:
```yaml
ALERT_ON_RELOAD: [ true/false ] Default: false
ALERT_SINK: [ slack/webhook ] Default: webhook
ALERT_ON_RELOAD: [ true/false ] Default: false
ALERT_SINK: [ slack/teams/webhook ] Default: webhook
ALERT_WEBHOOK_URL: Required if ALERT_ON_RELOAD is true
ALERT_ADDITIONAL_INFO: Any additional information to be added to alert
```
## Slack incoming-webhook creation docs
## Slack Incoming-Webhook Creation Docs
[Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks)

View File

@@ -8,7 +8,7 @@ There are 3 steps involved in migrating the Reloader from Helm2 to Helm3.
### Step 1
Install the helm-2to3 plugin
Install the `helm-2to3` plugin
```bash
helm3 plugin install https://github.com/helm/helm-2to3

View File

@@ -1,12 +1,12 @@
# How it works?
# How Does Reloader Work?
Reloader watches for `ConfigMap` and `Secret` and detects if there are changes in data of these objects. After change detection Reloader performs rolling upgrade on relevant Pods via associated `Deployment`, `Daemonset` and `Statefulset`.
## How change detection works
## How Does Change Detection Work?
Reloader watches changes in `configmaps` and `secrets` data. As soon as it detects a change in these. It forwards these objects to an update handler which decides if and how to perform the rolling upgrade.
## Requirements for rolling upgrade
## Requirements for Rolling Upgrade
To perform rolling upgrade a `deployment`, `daemonset` or `statefulset` must have
@@ -37,13 +37,13 @@ metadata:
Above mentioned annotation are also work for `Daemonsets` `Statefulsets` and `Rollouts`
## How Rolling upgrade works?
## How Does Rolling Upgrade Work?
When Reloader detects changes in configmap. It gets two objects of configmap. First object is an old configmap object which has a state before the latest change. Second object is new configmap object which contains latest changes. Reloader compares both objects and see whether any change in data occurred or not. If Reloader finds any change in new configmap object, only then, it moves forward with rolling upgrade.
After that, Reloader gets the list of all `deployments`, `daemonsets` and `statefulset` and looks for above mentioned annotation for configmap. If the annotation value contains the configmap name, it then looks for an environment variable which can contain the configmap or secret data change hash.
### Environment variable for Configmap
### Environment Variable for ConfigMap
If configmap name is foo then
@@ -51,7 +51,7 @@ If configmap name is foo then
STAKATER_FOO_CONFIGMAP
```
### Environment variable for Secret
### Environment Variable for Secret
If Secret name is foo then
@@ -63,7 +63,7 @@ If the environment variable is found then it gets its value and compares it with
Note: Rolling upgrade also works in the same way for secrets.
### Hash value Computation
### Hash Value Computation
Reloader uses SHA1 to compute hash value. SHA1 is used because it is efficient and less prone to collision.
@@ -77,6 +77,6 @@ helm --namespace {replace this with namespace name} template . > reloader.yaml
The output file can then be used to deploy Reloader in specific namespace.
## Compatibility with helm install and upgrade
## Compatibility With Helm Install and Upgrade
Reloader has no impact on helm deployment cycle. Reloader only injects an environment variable in `deployment`, `daemonset` or `statefulset`. The environment variable contains the SHA1 value of configmap's or secret's data. So if a deployment is created using Helm and Reloader updates the deployment, then next time you upgrade the helm release, Reloader will do nothing except changing that environment variable value in `deployment` , `daemonset` or `statefulset`.

View File

@@ -21,7 +21,7 @@ Reloader and k8s-trigger-controller are both built for same purpose. So there ar
Reloader supports deployment `rollout` as well as `daemonsets` and `statefulsets` `rollout`.
### Hashing usage
### Hashing Usage
#### `k8s-trigger-controller`

View File

@@ -2,7 +2,7 @@
Reloader's working can be verified by three ways.
## Verify from logs
## Verify From Logs
Check the logs of Reloader and verify that you can see logs looks like below, if you are able to find these logs then it means Reloader is working.
@@ -14,11 +14,11 @@ Updated test-resource of type Deployment in namespace: test-reloader
Below are the details that explain these logs:
### test-object
### `test-object`
`test-object` is the name of a `secret` or a `deployment` in which change has been detected.
### SECRET
### `SECRET`
`SECRET` is the type of `test-object`. It can either be `SECRET` or `CONFIGMAP`
@@ -30,11 +30,11 @@ Below are the details that explain these logs:
`test-resource` is the name of resource which is going to be updated
### Deployment
### `Deployment`
`Deployment` is the type of `test-resource`. It can either be a `Deployment`, `Daemonset` or `Statefulset`
## Verify by checking the age of Pod
## Verify by Checking the Age of Pod
A pod's age can tell whether Reloader is working correctly or not. If you know that a change in a `secret` or `configmap` has occurred, then check the relevant Pod's age immediately. It should be newly created few moments ago.
@@ -42,7 +42,7 @@ A pod's age can tell whether Reloader is working correctly or not. If you know t
`kubernetes dashboard` can be used to verify the working of Reloader. After a change in `secret` or `configmap`, check the relevant Pod's age from dashboard. It should be newly created few moments ago.
### Verify from command line
### Verify from Command Line
After a change in `secret` or `configmap`. Run the below-mentioned command and verify that the pod is newly created.
@@ -50,7 +50,7 @@ After a change in `secret` or `configmap`. Run the below-mentioned command and v
kubectl get pods <pod name> -n <namespace name>
```
## Verify from metrics
## Verify From Metrics
Some metrics are exported to Prometheus endpoint `/metrics` on port `9090`.
@@ -60,3 +60,16 @@ When Reloader is unable to reload, `reloader_reload_executed_total{success="fals
reloader_reload_executed_total{success="false"} 15
reloader_reload_executed_total{success="true"} 12
```
### Reloads by Namespace
Reloader can also export a metric to show the number of reloads by namespace. This feature is disabled by default, as it can lead to high cardinality in clusters with many namespaces.
The metric will have both `success` and `namespace` as attributes:
```text
reloader_reload_executed_total{success="false", namespace="some-namespace"} 2
reloader_reload_executed_total{success="true", namespace="some-namespace"} 1
```
To opt in, set the environment variable `METRICS_COUNT_BY_NAMESPACE` to `enabled` or set the Helm value `reloader.enableMetricsByNamespace` to `true`.

View File

@@ -1,8 +0,0 @@
# Features
These are the key features of Reloader:
1. Restart pod in a `deployment` on change in linked/related configmap's or secret's
1. Restart pod in a `daemonset` on change in linked/related configmap's or secret's
1. Restart pod in a `statefulset` on change in linked/related configmap's or secret's
1. Restart pod in a `rollout` on change in linked/related configmap's or secret's

12
docs/index.md Normal file
View File

@@ -0,0 +1,12 @@
# Introduction
Reloader can watch changes in `ConfigMap` and `Secret` and do rolling upgrades on Pods with their associated `DeploymentConfigs`, `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts`.
These are the key features of Reloader:
1. Restart pod in a `deployment` on change in linked/related configmap's or secret's
1. Restart pod in a `daemonset` on change in linked/related configmap's or secret's
1. Restart pod in a `statefulset` on change in linked/related configmap's or secret's
1. Restart pod in a `rollout` on change in linked/related configmap's or secret's
This site contains more details on how Reloader works. For an overview, please see the repository's [README file](https://github.com/stakater/Reloader/blob/master/README.md).

55
go.mod
View File

@@ -3,18 +3,18 @@ module github.com/stakater/Reloader
go 1.21
require (
github.com/argoproj/argo-rollouts v1.6.2
github.com/argoproj/argo-rollouts v1.7.0
github.com/openshift/api v3.9.0+incompatible
github.com/openshift/client-go v0.0.0-20231110140829-a6ca51f6d5ba
github.com/parnurzeal/gorequest v0.2.16
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_golang v1.19.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
k8s.io/kubectl v0.28.4
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
github.com/spf13/cobra v1.8.1
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
k8s.io/kubectl v0.29.3
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22
)
require (
@@ -22,51 +22,50 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
moul.io/http2curl v1.0.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
// Replacements for argo-rollouts

100
go.sum
View File

@@ -1,10 +1,13 @@
github.com/argoproj/argo-rollouts v1.6.2 h1:5Eur0FA9F9L0S+MkhxEtQlD9Hwb86U30QgTyKCUOor8=
github.com/argoproj/argo-rollouts v1.6.2/go.mod h1:X2kTiBaYCSounmw1kmONdIZTwJNzNQYC0SrXUgSw9UI=
github.com/argoproj/argo-rollouts v1.6.6 h1:JCJ0cGAwWkh2xCAHZ1OQmrobysRjCatmG9IZaLJpS1g=
github.com/argoproj/argo-rollouts v1.6.6/go.mod h1:X2kTiBaYCSounmw1kmONdIZTwJNzNQYC0SrXUgSw9UI=
github.com/argoproj/argo-rollouts v1.7.0 h1:3Hv8MUwGIWuZe50+yyS/4X21t4jT4shdGvgDe0lG6aw=
github.com/argoproj/argo-rollouts v1.7.0/go.mod h1:Te4HrUELxKiBpK8lgk77o4gTa3mv8pXCd8xdPprKrbs=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -14,11 +17,15 @@ github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/El
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ=
github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
@@ -33,13 +40,17 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -47,6 +58,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJY
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
@@ -70,8 +83,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -93,14 +104,16 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI=
github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY=
github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos=
github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
@@ -113,6 +126,8 @@ github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hg
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -127,37 +142,53 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -165,6 +196,7 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y=
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -173,10 +205,12 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
@@ -191,23 +225,39 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY=
k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0=
k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw=
k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80=
k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8=
k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg=
k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU=
k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU=
k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY=
k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4=
k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg=
k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/kubectl v0.28.4 h1:gWpUXW/T7aFne+rchYeHkyB8eVDl5UZce8G4X//kjUQ=
k8s.io/kubectl v0.28.4/go.mod h1:CKOccVx3l+3MmDbkXtIUtibq93nN2hkDR99XDCn7c/c=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/kubectl v0.29.3 h1:RuwyyIU42MAISRIePaa8Q7A3U74Q9P4MoJbDFz9o3us=
k8s.io/kubectl v0.29.3/go.mod h1:yCxfY1dbwgVdEt2zkJ6d5NNLOhhWgTyrqACIoFhpdd4=
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22 h1:ao5hUqGhsqdm+bYbjH/pRkCs0unBGe9UyDahzs9zQzQ=
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8=
moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=

View File

@@ -33,6 +33,8 @@ func SendWebhookAlert(msg string) {
if alert_sink == "slack" {
sendSlackAlert(webhook_url, webhook_proxy, msg)
} else if alert_sink == "teams" {
sendTeamsAlert(webhook_url, webhook_proxy, msg)
} else {
msg = strings.Replace(msg, "*", "", -1)
sendRawWebhookAlert(webhook_url, webhook_proxy, msg)
@@ -73,6 +75,29 @@ func sendSlackAlert(webhookUrl string, proxy string, msg string) []error {
return nil
}
// function to send alert to Microsoft Teams webhook
func sendTeamsAlert(webhookUrl string, proxy string, msg string) []error {
attachment := Attachment{
Text: msg,
}
request := gorequest.New().Proxy(proxy)
resp, _, err := request.
Post(webhookUrl).
RedirectPolicy(redirectPolicy).
Send(attachment).
End()
if err != nil {
return err
}
if resp.StatusCode != 200 {
return []error{fmt.Errorf("error sending msg. status: %v", resp.Status)}
}
return nil
}
// function to send alert to webhook service as text
func sendRawWebhookAlert(webhookUrl string, proxy string, msg string) []error {
request := gorequest.New().Proxy(proxy)

View File

@@ -13,13 +13,14 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"github.com/stakater/Reloader/internal/pkg/controller"
"github.com/stakater/Reloader/internal/pkg/metrics"
"github.com/stakater/Reloader/internal/pkg/options"
"github.com/stakater/Reloader/internal/pkg/util"
"github.com/stakater/Reloader/pkg/kube"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
)
// NewReloaderCommand starts the reloader controller
@@ -35,10 +36,13 @@ func NewReloaderCommand() *cobra.Command {
cmd.PersistentFlags().BoolVar(&options.AutoReloadAll, "auto-reload-all", false, "Auto reload all resources")
cmd.PersistentFlags().StringVar(&options.ConfigmapUpdateOnChangeAnnotation, "configmap-annotation", "configmap.reloader.stakater.com/reload", "annotation to detect changes in configmaps, specified by name")
cmd.PersistentFlags().StringVar(&options.SecretUpdateOnChangeAnnotation, "secret-annotation", "secret.reloader.stakater.com/reload", "annotation to detect changes in secrets, specified by name")
cmd.PersistentFlags().StringVar(&options.ReloaderAutoAnnotation, "auto-annotation", "reloader.stakater.com/auto", "annotation to detect changes in secrets")
cmd.PersistentFlags().StringVar(&options.ReloaderAutoAnnotation, "auto-annotation", "reloader.stakater.com/auto", "annotation to detect changes in secrets/configmaps")
cmd.PersistentFlags().StringVar(&options.ConfigmapReloaderAutoAnnotation, "configmap-auto-annotation", "configmap.reloader.stakater.com/auto", "annotation to detect changes in configmaps")
cmd.PersistentFlags().StringVar(&options.SecretReloaderAutoAnnotation, "secret-auto-annotation", "secret.reloader.stakater.com/auto", "annotation to detect changes in secrets")
cmd.PersistentFlags().StringVar(&options.AutoSearchAnnotation, "auto-search-annotation", "reloader.stakater.com/search", "annotation to detect changes in configmaps or secrets tagged with special match annotation")
cmd.PersistentFlags().StringVar(&options.SearchMatchAnnotation, "search-match-annotation", "reloader.stakater.com/match", "annotation to mark secrets or configmaps to match the search")
cmd.PersistentFlags().StringVar(&options.LogFormat, "log-format", "", "Log format to use (empty string for text, or JSON")
cmd.PersistentFlags().StringVar(&options.LogFormat, "log-format", "", "Log format to use (empty string for text, or JSON)")
cmd.PersistentFlags().StringVar(&options.LogLevel, "log-level", "info", "Log level to use (trace, debug, info, warning, error, fatal and panic)")
cmd.PersistentFlags().StringVar(&options.WebhookUrl, "webhook-url", "", "webhook to trigger instead of performing a reload")
cmd.PersistentFlags().StringSlice("resources-to-ignore", []string{}, "list of resources to ignore (valid options 'configMaps' or 'secrets')")
cmd.PersistentFlags().StringSlice("namespaces-to-ignore", []string{}, "list of namespaces to ignore")
@@ -78,7 +82,7 @@ func validateFlags(*cobra.Command, []string) error {
return nil
}
func configureLogging(logFormat string) error {
func configureLogging(logFormat, logLevel string) error {
switch logFormat {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
@@ -88,6 +92,12 @@ func configureLogging(logFormat string) error {
return fmt.Errorf("unsupported logging formatter: %q", logFormat)
}
}
// set log level
level, err := logrus.ParseLevel(logLevel)
if err != nil {
return err
}
logrus.SetLevel(level)
return nil
}
@@ -111,7 +121,7 @@ func getHAEnvs() (string, string) {
}
func startReloader(cmd *cobra.Command, args []string) {
err := configureLogging(options.LogFormat)
err := configureLogging(options.LogFormat, options.LogLevel)
if err != nil {
logrus.Warn(err)
}

View File

@@ -2449,7 +2449,7 @@ func TestController_resourceInNamespaceSelector(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
fakeClient := fake.NewSimpleClientset()
namespace, _ := fakeClient.CoreV1().Namespaces().Create(context.Background(), &tt.fields.namespace, metav1.CreateOptions{})
logrus.Infof("created fakeClient namesapce for testing = %s", namespace.Name)
logrus.Infof("created fakeClient namespace for testing = %s", namespace.Name)
c := &Controller{
client: fakeClient,

View File

@@ -133,6 +133,7 @@ func sendWebhook(url string) (string, []error) {
// the reloader seems to retry automatically so no retry logic added
return "", err
}
defer resp.Body.Close()
var buffer bytes.Buffer
_, bufferErr := io.Copy(&buffer, resp.Body)
if bufferErr != nil {
@@ -197,15 +198,18 @@ func PerformRollingUpgrade(clients kube.Clients, config util.Config, upgradeFunc
annotationValue, found := annotations[config.Annotation]
searchAnnotationValue, foundSearchAnn := annotations[options.AutoSearchAnnotation]
reloaderEnabledValue, foundAuto := annotations[options.ReloaderAutoAnnotation]
if !found && !foundAuto && !foundSearchAnn {
typedAutoAnnotationEnabledValue, foundTypedAuto := annotations[config.TypedAutoAnnotation]
if !found && !foundAuto && !foundTypedAuto && !foundSearchAnn {
annotations = upgradeFuncs.PodAnnotationsFunc(i)
annotationValue = annotations[config.Annotation]
searchAnnotationValue = annotations[options.AutoSearchAnnotation]
reloaderEnabledValue = annotations[options.ReloaderAutoAnnotation]
typedAutoAnnotationEnabledValue = annotations[config.TypedAutoAnnotation]
}
result := constants.NotUpdated
reloaderEnabled, _ := strconv.ParseBool(reloaderEnabledValue)
if reloaderEnabled || reloaderEnabledValue == "" && options.AutoReloadAll {
typedAutoAnnotationEnabled, _ := strconv.ParseBool(typedAutoAnnotationEnabledValue)
if reloaderEnabled || typedAutoAnnotationEnabled || reloaderEnabledValue == "" && typedAutoAnnotationEnabledValue == "" && options.AutoReloadAll {
result = invokeReloadStrategy(upgradeFuncs, i, config, true)
}
@@ -241,6 +245,7 @@ func PerformRollingUpgrade(clients kube.Clients, config util.Config, upgradeFunc
message := fmt.Sprintf("Update for '%s' of type '%s' in namespace '%s' failed with error %v", resourceName, upgradeFuncs.ResourceType, config.Namespace, err)
logrus.Errorf(message)
collectors.Reloaded.With(prometheus.Labels{"success": "false"}).Inc()
collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "false", "namespace": config.Namespace}).Inc()
if recorder != nil {
recorder.Event(i, v1.EventTypeWarning, "ReloadFail", message)
}
@@ -250,6 +255,7 @@ func PerformRollingUpgrade(clients kube.Clients, config util.Config, upgradeFunc
message += fmt.Sprintf(", Updated '%s' of type '%s' in namespace '%s'", resourceName, upgradeFuncs.ResourceType, config.Namespace)
logrus.Infof(message)
collectors.Reloaded.With(prometheus.Labels{"success": "true"}).Inc()
collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": config.Namespace}).Inc()
alert_on_reload, ok := os.LookupEnv("ALERT_ON_RELOAD")
if recorder != nil {
recorder.Event(i, v1.EventTypeNormal, "Reloaded", message)

File diff suppressed because it is too large Load Diff

View File

@@ -113,7 +113,7 @@ func TestRunLeaderElection(t *testing.T) {
}
// TestRunLeaderElectionWithControllers tests that leadership election works
// wiht real controllers and that on context cancellation the controllers stop
// with real controllers and that on context cancellation the controllers stop
// running.
func TestRunLeaderElectionWithControllers(t *testing.T) {
t.Logf("Creating controller")

View File

@@ -1,13 +1,16 @@
package metrics
import (
"net/http"
"os"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"net/http"
)
type Collectors struct {
Reloaded *prometheus.CounterVec
Reloaded *prometheus.CounterVec
ReloadedByNamespace *prometheus.CounterVec
}
func NewCollectors() Collectors {
@@ -17,21 +20,40 @@ func NewCollectors() Collectors {
Name: "reload_executed_total",
Help: "Counter of reloads executed by Reloader.",
},
[]string{"success"},
[]string{
"success",
},
)
//set 0 as default value
reloaded.With(prometheus.Labels{"success": "true"}).Add(0)
reloaded.With(prometheus.Labels{"success": "false"}).Add(0)
reloaded_by_namespace := prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "reloader",
Name: "reload_executed_total_by_namespace",
Help: "Counter of reloads executed by Reloader by namespace.",
},
[]string{
"success",
"namespace",
},
)
return Collectors{
Reloaded: reloaded,
Reloaded: reloaded,
ReloadedByNamespace: reloaded_by_namespace,
}
}
func SetupPrometheusEndpoint() Collectors {
collectors := NewCollectors()
prometheus.MustRegister(collectors.Reloaded)
if os.Getenv("METRICS_COUNT_BY_NAMESPACE") == "enabled" {
prometheus.MustRegister(collectors.ReloadedByNamespace)
}
http.Handle("/metrics", promhttp.Handler())
return collectors

View File

@@ -11,8 +11,12 @@ var (
// SecretUpdateOnChangeAnnotation is an annotation to detect changes in
// secrets specified by name
SecretUpdateOnChangeAnnotation = "secret.reloader.stakater.com/reload"
// ReloaderAutoAnnotation is an annotation to detect changes in secrets
// ReloaderAutoAnnotation is an annotation to detect changes in secrets/configmaps
ReloaderAutoAnnotation = "reloader.stakater.com/auto"
// ConfigmapReloaderAutoAnnotation is an annotation to detect changes in configmaps
ConfigmapReloaderAutoAnnotation = "configmap.reloader.stakater.com/auto"
// SecretReloaderAutoAnnotation is an annotation to detect changes in secrets
SecretReloaderAutoAnnotation = "secret.reloader.stakater.com/auto"
// AutoSearchAnnotation is an annotation to detect changes in
// configmaps or triggers with the SearchMatchAnnotation
AutoSearchAnnotation = "reloader.stakater.com/search"
@@ -21,6 +25,8 @@ var (
SearchMatchAnnotation = "reloader.stakater.com/match"
// LogFormat is the log format to use (json, or empty string for default)
LogFormat = ""
// LogLevel is the log level to use (trace, debug, info, warning, error, fatal and panic)
LogLevel = ""
// IsArgoRollouts Adds support for argo rollouts
IsArgoRollouts = "false"
// ReloadStrategy Specify the update strategy

View File

@@ -69,24 +69,34 @@ func DeleteNamespace(namespace string, client kubernetes.Interface) {
}
}
func getObjectMeta(namespace string, name string, autoReload bool) metav1.ObjectMeta {
func getObjectMeta(namespace string, name string, autoReload bool, secretAutoReload bool, configmapAutoReload bool) metav1.ObjectMeta {
return metav1.ObjectMeta{
Name: name,
Namespace: namespace,
Labels: map[string]string{"firstLabel": "temp"},
Annotations: getAnnotations(name, autoReload),
Annotations: getAnnotations(name, autoReload, secretAutoReload, configmapAutoReload),
}
}
func getAnnotations(name string, autoReload bool) map[string]string {
func getAnnotations(name string, autoReload bool, secretAutoReload bool, configmapAutoReload bool) map[string]string {
annotations := make(map[string]string)
if autoReload {
return map[string]string{
options.ReloaderAutoAnnotation: "true"}
annotations[options.ReloaderAutoAnnotation] = "true"
}
if secretAutoReload {
annotations[options.SecretReloaderAutoAnnotation] = "true"
}
if configmapAutoReload {
annotations[options.ConfigmapReloaderAutoAnnotation] = "true"
}
return map[string]string{
options.ConfigmapUpdateOnChangeAnnotation: name,
options.SecretUpdateOnChangeAnnotation: name}
if len(annotations) > 0 {
return annotations
} else {
return map[string]string{
options.ConfigmapUpdateOnChangeAnnotation: name,
options.SecretUpdateOnChangeAnnotation: name}
}
}
func getEnvVarSources(name string) []v1.EnvFromSource {
@@ -332,7 +342,7 @@ func getPodTemplateSpecWithInitContainerAndEnv(name string) v1.PodTemplateSpec {
func GetDeployment(namespace string, deploymentName string) *appsv1.Deployment {
replicaset := int32(1)
return &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, false),
ObjectMeta: getObjectMeta(namespace, deploymentName, false, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -351,7 +361,7 @@ func GetDeploymentConfig(namespace string, deploymentConfigName string) *openshi
replicaset := int32(1)
podTemplateSpecWithVolume := getPodTemplateSpecWithVolumes(deploymentConfigName)
return &openshiftv1.DeploymentConfig{
ObjectMeta: getObjectMeta(namespace, deploymentConfigName, false),
ObjectMeta: getObjectMeta(namespace, deploymentConfigName, false, false, false),
Spec: openshiftv1.DeploymentConfigSpec{
Replicas: replicaset,
Strategy: openshiftv1.DeploymentStrategy{
@@ -366,7 +376,7 @@ func GetDeploymentConfig(namespace string, deploymentConfigName string) *openshi
func GetDeploymentWithInitContainer(namespace string, deploymentName string) *appsv1.Deployment {
replicaset := int32(1)
return &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, false),
ObjectMeta: getObjectMeta(namespace, deploymentName, false, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -384,7 +394,7 @@ func GetDeploymentWithInitContainer(namespace string, deploymentName string) *ap
func GetDeploymentWithInitContainerAndEnv(namespace string, deploymentName string) *appsv1.Deployment {
replicaset := int32(1)
return &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, true),
ObjectMeta: getObjectMeta(namespace, deploymentName, true, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -401,7 +411,7 @@ func GetDeploymentWithInitContainerAndEnv(namespace string, deploymentName strin
func GetDeploymentWithEnvVars(namespace string, deploymentName string) *appsv1.Deployment {
replicaset := int32(1)
return &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, true),
ObjectMeta: getObjectMeta(namespace, deploymentName, true, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -419,7 +429,7 @@ func GetDeploymentConfigWithEnvVars(namespace string, deploymentConfigName strin
replicaset := int32(1)
podTemplateSpecWithEnvVars := getPodTemplateSpecWithEnvVars(deploymentConfigName)
return &openshiftv1.DeploymentConfig{
ObjectMeta: getObjectMeta(namespace, deploymentConfigName, false),
ObjectMeta: getObjectMeta(namespace, deploymentConfigName, false, false, false),
Spec: openshiftv1.DeploymentConfigSpec{
Replicas: replicaset,
Strategy: openshiftv1.DeploymentStrategy{
@@ -433,7 +443,7 @@ func GetDeploymentConfigWithEnvVars(namespace string, deploymentConfigName strin
func GetDeploymentWithEnvVarSources(namespace string, deploymentName string) *appsv1.Deployment {
replicaset := int32(1)
return &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, true),
ObjectMeta: getObjectMeta(namespace, deploymentName, true, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -450,7 +460,7 @@ func GetDeploymentWithEnvVarSources(namespace string, deploymentName string) *ap
func GetDeploymentWithPodAnnotations(namespace string, deploymentName string, both bool) *appsv1.Deployment {
replicaset := int32(1)
deployment := &appsv1.Deployment{
ObjectMeta: getObjectMeta(namespace, deploymentName, false),
ObjectMeta: getObjectMeta(namespace, deploymentName, false, false, false),
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -465,14 +475,38 @@ func GetDeploymentWithPodAnnotations(namespace string, deploymentName string, bo
if !both {
deployment.ObjectMeta.Annotations = nil
}
deployment.Spec.Template.ObjectMeta.Annotations = getAnnotations(deploymentName, true)
deployment.Spec.Template.ObjectMeta.Annotations = getAnnotations(deploymentName, true, false, false)
return deployment
}
func GetDeploymentWithTypedAutoAnnotation(namespace string, deploymentName string, resourceType string) *appsv1.Deployment {
replicaset := int32(1)
var objectMeta metav1.ObjectMeta
if resourceType == SecretResourceType {
objectMeta = getObjectMeta(namespace, deploymentName, false, true, false)
} else if resourceType == ConfigmapResourceType {
objectMeta = getObjectMeta(namespace, deploymentName, false, false, true)
}
return &appsv1.Deployment{
ObjectMeta: objectMeta,
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
},
Replicas: &replicaset,
Strategy: appsv1.DeploymentStrategy{
Type: appsv1.RollingUpdateDeploymentStrategyType,
},
Template: getPodTemplateSpecWithVolumes(deploymentName),
},
}
}
// GetDaemonSet provides daemonset for testing
func GetDaemonSet(namespace string, daemonsetName string) *appsv1.DaemonSet {
return &appsv1.DaemonSet{
ObjectMeta: getObjectMeta(namespace, daemonsetName, false),
ObjectMeta: getObjectMeta(namespace, daemonsetName, false, false, false),
Spec: appsv1.DaemonSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -487,7 +521,7 @@ func GetDaemonSet(namespace string, daemonsetName string) *appsv1.DaemonSet {
func GetDaemonSetWithEnvVars(namespace string, daemonSetName string) *appsv1.DaemonSet {
return &appsv1.DaemonSet{
ObjectMeta: getObjectMeta(namespace, daemonSetName, true),
ObjectMeta: getObjectMeta(namespace, daemonSetName, true, false, false),
Spec: appsv1.DaemonSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -503,7 +537,7 @@ func GetDaemonSetWithEnvVars(namespace string, daemonSetName string) *appsv1.Dae
// GetStatefulSet provides statefulset for testing
func GetStatefulSet(namespace string, statefulsetName string) *appsv1.StatefulSet {
return &appsv1.StatefulSet{
ObjectMeta: getObjectMeta(namespace, statefulsetName, false),
ObjectMeta: getObjectMeta(namespace, statefulsetName, false, false, false),
Spec: appsv1.StatefulSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -519,7 +553,7 @@ func GetStatefulSet(namespace string, statefulsetName string) *appsv1.StatefulSe
// GetStatefulSet provides statefulset for testing
func GetStatefulSetWithEnvVar(namespace string, statefulsetName string) *appsv1.StatefulSet {
return &appsv1.StatefulSet{
ObjectMeta: getObjectMeta(namespace, statefulsetName, true),
ObjectMeta: getObjectMeta(namespace, statefulsetName, true, false, false),
Spec: appsv1.StatefulSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -729,6 +763,16 @@ func CreateDeploymentWithEnvVarSourceAndAnnotations(client kubernetes.Interface,
return deployment, err
}
// CreateDeploymentWithTypedAutoAnnotation creates a deployment in given namespace and returns the Deployment with typed auto annotation
func CreateDeploymentWithTypedAutoAnnotation(client kubernetes.Interface, deploymentName string, namespace string, resourceType string) (*appsv1.Deployment, error) {
logrus.Infof("Creating Deployment")
deploymentClient := client.AppsV1().Deployments(namespace)
deploymentObj := GetDeploymentWithTypedAutoAnnotation(namespace, deploymentName, resourceType)
deployment, err := deploymentClient.Create(context.TODO(), deploymentObj, metav1.CreateOptions{})
time.Sleep(3 * time.Second)
return deployment, err
}
// CreateDaemonSet creates a deployment in given namespace and returns the DaemonSet
func CreateDaemonSet(client kubernetes.Interface, daemonsetName string, namespace string, volumeMount bool) (*appsv1.DaemonSet, error) {
logrus.Infof("Creating DaemonSet")
@@ -858,9 +902,11 @@ func VerifyResourceEnvVarUpdate(clients kube.Clients, config util.Config, envVar
annotationValue := annotations[config.Annotation]
searchAnnotationValue := annotations[options.AutoSearchAnnotation]
reloaderEnabledValue := annotations[options.ReloaderAutoAnnotation]
typedAutoAnnotationEnabledValue := annotations[config.TypedAutoAnnotation]
reloaderEnabled, err := strconv.ParseBool(reloaderEnabledValue)
typedAutoAnnotationEnabled, errTyped := strconv.ParseBool(typedAutoAnnotationEnabledValue)
matches := false
if err == nil && reloaderEnabled {
if err == nil && reloaderEnabled || errTyped == nil && typedAutoAnnotationEnabled {
matches = true
} else if annotationValue != "" {
values := strings.Split(annotationValue, ",")
@@ -902,9 +948,11 @@ func VerifyResourceAnnotationUpdate(clients kube.Clients, config util.Config, up
annotationValue := annotations[config.Annotation]
searchAnnotationValue := annotations[options.AutoSearchAnnotation]
reloaderEnabledValue := annotations[options.ReloaderAutoAnnotation]
typedAutoAnnotationEnabledValue := annotations[config.TypedAutoAnnotation]
reloaderEnabled, _ := strconv.ParseBool(reloaderEnabledValue)
typedAutoAnnotationEnabled, _ := strconv.ParseBool(typedAutoAnnotationEnabledValue)
matches := false
if reloaderEnabled || reloaderEnabledValue == "" && options.AutoReloadAll {
if reloaderEnabled || typedAutoAnnotationEnabled || reloaderEnabledValue == "" && typedAutoAnnotationEnabledValue == "" && options.AutoReloadAll {
matches = true
} else if annotationValue != "" {
values := strings.Split(annotationValue, ",")

View File

@@ -12,6 +12,7 @@ type Config struct {
ResourceName string
ResourceAnnotations map[string]string
Annotation string
TypedAutoAnnotation string
SHAValue string
Type string
}
@@ -23,6 +24,7 @@ func GetConfigmapConfig(configmap *v1.ConfigMap) Config {
ResourceName: configmap.Name,
ResourceAnnotations: configmap.Annotations,
Annotation: options.ConfigmapUpdateOnChangeAnnotation,
TypedAutoAnnotation: options.ConfigmapReloaderAutoAnnotation,
SHAValue: GetSHAfromConfigmap(configmap),
Type: constants.ConfigmapEnvVarPostfix,
}
@@ -35,6 +37,7 @@ func GetSecretConfig(secret *v1.Secret) Config {
ResourceName: secret.Name,
ResourceAnnotations: secret.Annotations,
Annotation: options.SecretUpdateOnChangeAnnotation,
TypedAutoAnnotation: options.SecretReloaderAutoAnnotation,
SHAValue: GetSHAfromSecret(secret.Data),
Type: constants.SecretEnvVarPostfix,
}

View File

@@ -1,6 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:recommended"
],
"labels": [
"dependencies"
],
"customManagers": [
{
"customType": "regex",
"fileMatch": [
".vale.ini"
],
"matchStrings": [
"https:\/\/github\\.com\/(?<depName>.*)\/releases\/download\/(?<currentValue>.*)\/.*\\.zip"
],
"datasourceTemplate": "github-releases"
}
]
}

1
theme_common Submodule

Submodule theme_common added at f63139f84a

22
theme_override/mkdocs.yml Normal file
View File

@@ -0,0 +1,22 @@
site_name: Stakater Reloader
docs_dir: docs
site_url: https://docs.stakater.com/reloader/
repo_url: https://github.com/stakater/reloader
edit_uri: blob/master/docs/
theme:
favicon: assets/images/favicon.svg
nav:
- index.md
- How-to Guides:
- Verify-Reloader-Working.md
- Alerting.md
- Reloader-with-Sealed-Secrets.md
- Helm2-to-Helm3.md
- References:
- How-it-works.md
- Container Build.md
- Comparisons with similar tools:
- Reloader-vs-ConfigmapController.md
- Reloader-vs-k8s-trigger-controller.md

0
theme_override/resources/.gitignore vendored Normal file
View File

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

Submodule vocabulary deleted from 899bf2db35