Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRE-1760: Watch ArgoRollout resources that is specified in RolloutSca… #20

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

h3poteto
Copy link
Contributor

@h3poteto h3poteto commented Nov 30, 2023

…leDown

SRE-1760

Watch ArgoRollout resources, and if the ArgoRollout is a target of a RolloutScaleDown resource, output logs.

$ make run   
test -s /home/h3poteto/src/github.com/oviceinc/rollout-optimizer-controller/bin/controller-gen && /home/h3poteto/src/github.com/oviceinc/rollout-optimizer-controller/bin/controller-gen --version | grep -q v0.13.0 || \
GOBIN=/home/h3poteto/src/github.com/oviceinc/rollout-optimizer-controller/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
/home/h3poteto/src/github.com/oviceinc/rollout-optimizer-controller/bin/controller-gen rbac:roleName=manager-role crd webhook paths="{./api/..., ./internal/controller/...}" output:crd:artifacts:config=config/crd/bases
/home/h3poteto/src/github.com/oviceinc/rollout-optimizer-controller/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./api/..."
go fmt ./...
go vet ./...
go run ./cmd/main.go
2023-12-01T15:10:00+09:00       INFO    setup   starting manager
2023-12-01T15:10:00+09:00       INFO    controller-runtime.metrics      Starting metrics server
2023-12-01T15:10:00+09:00       INFO    starting server {"kind": "health probe", "addr": "[::]:8081"}
2023-12-01T15:10:00+09:00       INFO    controller-runtime.metrics      Serving metrics server  {"bindAddress": ":8080", "secure": false}
2023-12-01T15:10:00+09:00       INFO    Starting EventSource    {"controller": "rollout", "controllerGroup": "argoproj.io", "controllerKind": "Rollout", "source": "kind source: *v1alpha1.Rollout"}
2023-12-01T15:10:00+09:00       INFO    Starting Controller     {"controller": "rollout", "controllerGroup": "argoproj.io", "controllerKind": "Rollout"}
2023-12-01T15:10:01+09:00       INFO    Starting workers        {"controller": "rollout", "controllerGroup": "argoproj.io", "controllerKind": "Rollout", "worker count": 1}
2023-12-01T15:10:06+09:00       DEBUG   Target ArgoRollout      {"controller": "rollout", "controllerGroup": "argoproj.io", "controllerKind": "Rollout", "Rollout": {"name":"rollout-sample","namespace":"h3poteto"}, "namespace": "h3poteto", "name": "rollout-sample", "reconcileID": "579c2f23-bc4a-4fa4-8bf8-f64d3a1d1c0e", "h3poteto": "rollout-sample"}
2023-12-01T15:10:06+09:00       DEBUG   Target ArgoRollout      {"controller": "rollout", "controllerGroup": "argoproj.io", "controllerKind": "Rollout", "Rollout": {"name":"rollout-sample","namespace":"h3poteto"}, "namespace": "h3poteto", "name": "rollout-sample", "reconcileID": "071ee415-e99b-44c8-92d4-79dfa8ac4f28", "h3poteto": "rollout-sample"}

Copy link

linear bot commented Nov 30, 2023

SRE-1760 Watch rollout resources

Goal

Determine when the controller should work.

Context

Approach

Check the document: https://ovice.slack.com/archives/C02CC9ZNK25/p1700640807989399

  • ✅ Watch RolloutScaleDown resources.
  • Watch ArgoRollout resources that is specified in RolloutScaleDown resource.
  • Detect updates of rollout resources
  • Print some logs when detect it.

@h3poteto h3poteto marked this pull request as ready for review December 1, 2023 06:11
@h3poteto h3poteto requested a review from NourDh December 1, 2023 06:11
@@ -1,4 +1,8 @@
## Append samples of your project ##
namespace: h3poteto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are going to leave this namespace for test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. Which namespace is better? Should I create test namespace?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any name is fine, maybe "rollout-test"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@h3poteto h3poteto merged commit 5bddf82 into main Dec 5, 2023
2 checks passed
@h3poteto h3poteto deleted the sre-1760/watch-argo branch December 5, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants