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

[release-1.21] Add events to deploy controller #3615

Merged
merged 3 commits into from
Jul 12, 2021

Conversation

brandond
Copy link
Member

@brandond brandond commented Jul 9, 2021

Proposed changes

  • Addresses issues with visibility (were errors encountered when parsing or applying the manifest) by adding change/failure events viewable via kubectl get events -n kube-system or kubectl describe addon -n kube-system <addon>. Events are inspired by k/k event behavior for Pods, where Events are created for container pull start, container pull success/failure, etc. They should be meaningful but not spammy.

Types of changes

  • New feature

Verification

Note events when describing AddOn: kubectl describe addon -n kube-system coredns`

Linked Issues

This is a stripped-down version of #2169 that only adds events; it doesn't attempt to address any of the other issues with tracking who modified the resource, since this can be (minimally) accomplished with #3433

Example output

Name:         traefik
Namespace:    kube-system
Labels:       <none>
Annotations:  <none>
API Version:  k3s.cattle.io/v1
Kind:         Addon
Metadata:
  Creation Timestamp:  2020-08-27T06:33:10Z
  Generation:          1
  Resource Version:  234
  Self Link:         /apis/k3s.cattle.io/v1/namespaces/kube-system/addons/traefik
  UID:               9485676f-0e38-481b-8989-b5efe3e43f1a
Spec:
  Checksum:  6d311bade7254b59e7b2bb3838032ab2686cb92d725408092f568960973927a6
  Source:    /var/lib/repos/k3s/server/manifests/traefik.yaml
Status:
Events:
  Type    Reason            Age   From                                Message
  ----    ------            ----  ----                                -------
  Normal  ApplyingManifest  30s   deploy, dev01.lan.khaus  Applying manifest at "/var/lib/repos/k3s/server/manifests/traefik.yaml"
  Normal  AppliedManifest   30s   deploy, dev01.lan.khaus  Applied manifest at "/var/lib/repos/k3s/server/manifests/traefik.yaml"

@brandond brandond requested a review from a team as a code owner July 9, 2021 20:57
Copy link
Contributor

@galal-hussein galal-hussein left a comment

Choose a reason for hiding this comment

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

LGTM

brandond added 3 commits July 9, 2021 14:30
Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit 6e48ca9)
Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit ea2cd6d)
Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit a7d1159)
@brandond brandond force-pushed the fix_1337_release-1.21 branch from a72b994 to 1588dc0 Compare July 9, 2021 21:30
@brandond brandond merged commit 5a88b5b into k3s-io:release-1.21 Jul 12, 2021
@brandond brandond deleted the fix_1337_release-1.21 branch June 6, 2024 21:18
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.

3 participants