From ed3b9a63b1900dbe8ae570782d3a50401b986ba0 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Fri, 19 May 2023 12:55:27 +0530 Subject: [PATCH] Fix: example manager and instructions (#48) * Feat: upgrade k8s.io dependency to 0.26 (#39) * Feat: upgrade k8s.io dependency to 0.26 Signed-off-by: Yin Da * Fix: golangci-lint action failure Signed-off-by: Yin Da --------- Signed-off-by: Yin Da Signed-off-by: Amit Singh * Feat: add cluster info to action context (#43) Feat: add cluster info in action context Signed-off-by: yangsoon Co-authored-by: yangsoon Signed-off-by: Amit Singh * Feat: add cronjob source (#42) * Refactor: allow the use of singleton for one Source, while also allowing non-singleton Sources, making it more extensible Signed-off-by: Charlie Chiang * Feat: add cronjob source Signed-off-by: Charlie Chiang * Chore: update cron lib Signed-off-by: Charlie Chiang * Feat: do not exit if config contains invalid sources Signed-off-by: Charlie Chiang * Chore: add tests and fix linter Signed-off-by: Charlie Chiang * Chore: go mod tidy Signed-off-by: Charlie Chiang * Docs: add cronjob example Signed-off-by: Charlie Chiang * fix comments Signed-off-by: Charlie Chiang * Chore: force lint to use the exact version Signed-off-by: Charlie Chiang * remove unnecessary dep Signed-off-by: Charlie Chiang * fix comments Signed-off-by: Charlie Chiang * use codecov token Signed-off-by: Charlie Chiang * update lint script Signed-off-by: Charlie Chiang --------- Signed-off-by: Charlie Chiang Signed-off-by: Amit Singh * Feat: support leader election for kube-trigger (#45) Signed-off-by: yangsoon Co-authored-by: yangsoon Signed-off-by: Amit Singh * adds instruction to enable kube-trigger addon Signed-off-by: Amit Singh * updates sample.yaml path Signed-off-by: Amit Singh * fix: updates instructions to apply config files in order Signed-off-by: Amit Singh * fix: adds the missing api group to the first rule Signed-off-by: Amit Singh * Revert "Feat: support leader election for kube-trigger (#45)" This reverts commit 4351008607f9f311cb43f1132292cfa42746d57a. Removing changes unrelated to this branch Signed-off-by: Amit Singh * Revert "Feat: add cronjob source (#42)" This reverts commit 46f5975b64e9c3e412e7d3e5564b08d111814ce5. Removes changes unrelated to the branch Signed-off-by: Amit Singh * Revert "Feat: add cluster info to action context (#43)" This reverts commit e214be5be37d60222170eb416c3234135ef994bf. Removes changes unrelated to the branch Signed-off-by: Amit Singh * Revert "Feat: upgrade k8s.io dependency to 0.26 (#39)" This reverts commit a22e31611efdf53ad8029e254dfea48ba0cf32ac. Removes changes unrelated to the branch Signed-off-by: Amit Singh --------- Signed-off-by: Yin Da Signed-off-by: Amit Singh Signed-off-by: yangsoon Signed-off-by: Charlie Chiang Co-authored-by: Somefive Co-authored-by: yangs Co-authored-by: yangsoon Co-authored-by: Charlie Chiang --- config/manager/role.yaml | 4 +++- examples/README.md | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/manager/role.yaml b/config/manager/role.yaml index 675adf7..031d7d0 100644 --- a/config/manager/role.yaml +++ b/config/manager/role.yaml @@ -5,7 +5,9 @@ metadata: creationTimestamp: null name: kube-trigger-manager-role rules: -- resources: +- apiGroups: + - "" + resources: - configmaps verbs: - get diff --git a/examples/README.md b/examples/README.md index a6e9eb0..35be2d1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -7,6 +7,10 @@ updated whenever the ConfigMaps that are referenced by `ref-objects` are updated ## Prerequisites - Install [KubeVela](https://kubevela.net/docs/install) in your cluster +- Enable the `kube-trigger` addon +```shell +vela addon enable kube-trigger +``` ## What we want to achieve? @@ -26,7 +30,7 @@ Apply `sample.yaml` to create 2 Applications and 2 ConfigMaps in the default nam trigger 2 Application updates. ```shell -kubectl apply sample.yaml +kubectl apply -f examples/sample.yaml ``` 2. **Run kube-trigger** @@ -43,7 +47,9 @@ Standalone: In-Cluster: ```shell -kubectl apply -f config/ +kubectl apply -f config/crd/ +kubectl apply -f config/definition/ +kubectl apply -f config/manager/ ``` 3. **Watch ApplicationRevision changes** so that you can see what it does.