profile
viewpoint
Chelsey Chen chelseychen Waterloo, Canada

Stackdriver/kubernetes-configs 11

Internal testing configurations for Stackdriver Kubernetes monitoring.

chelseychen/enhancements 0

Features tracking repo for Kubernetes releases

chelseychen/fluent-plugin-kubernetes_metadata_filter 0

Enrich your fluentd events with Kubernetes metadata

chelseychen/hello-world 0

My first project

chelseychen/kubernetes 0

Production-Grade Container Scheduling and Management

chelseychen/test-infra 0

Test infrastructure for the Kubernetes project.

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

Got it, thanks for confirming!

chelseychen

comment created time in 7 hours

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

@liggitt This PR is still pending the tests, which would block the merge. The code freeze cut is today, I wonder if this would be affected?

chelseychen

comment created time in 7 hours

push eventchelseychen/kubernetes

Chelsey Chen

commit sha e010436e2acc96d710620a91ceaaa86becca4060

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

@liggitt I added reportingController to core/event/strategy.go#ToSelectableFields, and I have to add it to pkg/apis/core/v1/conversion.go#AddFieldLabelConversionsForEvent as well in order to pass TestSelectableFieldLabelConversions test under strategy_test.go since that test is testing against core/v1 field label conversion. I know it's a bit weird to add reportingController to core/v1 as it's not a field for that, but I guess it's better than removing TestSelectableFieldLabelConversions test, right? Or maybe there's other better solutions? What do you think?

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha b0668e40d0cecb2d2b0525936770a7a62297b615

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 85cce637139bf8ad1208f205f09974afc3a66053

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

Thank you so much for the help! I've updated the codes and hopefully the tests can pass this time..

It looks like the events REST storage initialization is using the core events registry, which uses the core events strategy. The events strategy (at pkg/registry/events/event/strategy.go) is unreferenced and unused.

BTW, I'm curious about how you found out this - did you have a way to test it or just some sort of guess?

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 6928253c2d9178767a2577c34d48345295278d09

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 563de0f2784973e5a20aee2e7f97215d4221e208

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha cbca971c9fc264463d60e2697564d9756ed698fe

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

/test pull-kubernetes-node-e2e

chelseychen

comment created time in 2 days

pull request commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

@liggitt Looks like the e2e test failed for the case when listing events with field selection filtering on reportingController. The error message said expected single event, got []v1.Event(nil). I dug into codes but couldn't figure out why it couldn't fetch the event with "reportingController=test-controller". I did register the field selector and define SelectableFields for events/v1 correctly as well. Could you please TAL? Did I miss something?

chelseychen

comment created time in 2 days

Pull request review commentkubernetes/kubernetes

Fix a few places where source field is empty when creating events via events/v1

 func init() { 	// We only register manually written functions here. The registration of the 	// generated functions takes place in the generated files. The separation 	// makes the code compile even when the generated files are missing.-	localSchemeBuilder.Register(RegisterDefaults)

Didn't know Default shouldn't be removed. I've added it back. Not sure if e2e test failure is related to this..

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 90f48f3ececf8fc9d04491a953f775e977de7921

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 4a7b32c3fd80e968993a49ee91d3009186e42622

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 5809885d59083d311a4efc42fb8723c94426ed0e

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha cb1bcb326587e4f4b9d4872713a62f9a3759fc73

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha baa068cb31857c3b9c55aade30826d4cfa878517

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

Pull request review commentkubernetes/kubernetes

Update conversion between ReportingController and Source.Component

 func layoutContainerCells(containers []api.Container) (names string, images stri 	return namesBuffer.String(), imagesBuffer.String() } -// formatEventSource formats EventSource as a comma separated string excluding Host when empty-func formatEventSource(es api.EventSource) string {+// formatEventSource formats EventSource as a comma separated string excluding Host when empty,+// or returns reportingController when EventSource is empty+func formatEventSource(es api.EventSource, reportingController string) string {

Make sense. Done.

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha c93cbc762722de6bb7ef353761907e2f0d5f5a1d

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 0d44c16bdb6520a4977c354f989af3d17939af55

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

Pull request review commentkubernetes/kubernetes

Update conversion between ReportingController and Source.Component

 func Convert_v1_Event_To_core_Event(in *v1.Event, out *k8s_api.Event, s conversi 	out.FirstTimestamp = in.DeprecatedFirstTimestamp 	out.LastTimestamp = in.DeprecatedLastTimestamp 	out.Count = in.DeprecatedCount++	// translate reportingController to out.Source.Component field if it is empty+	if len(out.Source.Component) == 0 {+		out.Source.Component = out.ReportingController+	}

As we discussed offline, we would revert this conversion

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha dfd57052e5a3039d32746b41f0725c0cb6cb1c76

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha d1bc00f74f1a8d217bada5d101741edc4d1fdbaf

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

How long have these tests existed? I only see one week of history in https://testgrid.k8s.io/google-gci#gce-cos-master-flaky-repro&width=5&include-filter-by-regex=sig-instrumentation

Right, the tests were just added a week ago: #92607

We need two weeks before merging.

Note that code freeze is Thursday, but Test Freeze is not until August 6th, so there is plenty of time to get this in.

https://github.com/kubernetes/sig-release/tree/master/releases/release-1.19#timeline

SGTM, thanks for your review.

chelseychen

comment created time in 2 days

Pull request review commentkubernetes/kubernetes

Update conversion between ReportingController and Source.Component

 func ToSelectableFields(event *api.Event) fields.Set { 		"involvedObject.resourceVersion": event.InvolvedObject.ResourceVersion, 		"involvedObject.fieldPath":       event.InvolvedObject.FieldPath, 		"reason":                         event.Reason,-		"source":                         event.Source.Component,+		"source":                         event.ReportingController,

Done.

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha e4c922b64e25bc222a8914f2034a8ff65ce239ba

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Update conversion between ReportingController and Source.Component

/assign @liggitt /cc @wojtek-t

chelseychen

comment created time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha f9fecba61a61024ba1c7b7ec5d302fc5b649658c

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha c901a599ba2cb783c7e67268869c4165af9eb7a6

Update conversion between ReportingController and Source.Component

view details

push time in 2 days

PR opened kubernetes/kubernetes

Update conversion between ReportingController and Source.Component

What type of PR is this? kind bug

What this PR does / why we need it:

New events API conversion is missing AddFieldLabelConversionsForEvent. Also it lacks conversion between Source.Component and ReportingController fields.

Since DeprecatedSource field assignment was removed in #92662, which means Source field becomes empty when converting to core/v1, which would cause e2e tests fail when listing events with source fieldSelector

Which issue(s) this PR fixes:

Fixes #92870

Also it's related to #92795

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: <https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/383-new-event-api-ga-graduation>
+92 -3

0 comment

4 changed files

pr created time in 2 days

push eventchelseychen/kubernetes

Sergiusz Urbaniak

commit sha 83b850cd54295060ee1a66b4a9e90f54cc0bb0e1

kube-aggregator/openapi/controller: remove trailing 1 in failure rate limiter

view details

Ted Yu

commit sha 3f043dd8a06a553de91e1bfb84500d66daf97e18

Sort init container statuses using non-nested loop

view details

Patrick Ohly

commit sha c20721aa9f0a69f267f899ca387fdc489cfe6f24

storage: enhance test for ValidateCSIDriverUpdate This revised test changes one field at a time in various ways. This ensures that one failure reason doesn't mask the other. An incorrect comment also gets fixed. Suggested in https://github.com/kubernetes/kubernetes/pull/80568#pullrequestreview-272836101.

view details

Claudiu Belu

commit sha 31ea600b284515dd3470b244f9c6e1548408ecfe

images: Adds GOARM to images' Makefiles In order to build the image binaries, the GOARM variable is required, but not all Makefiles have it defined, causing the make to fail on those images. This adds the require GOARM variable to the Makefiles in question.

view details

Alena Prokharchyk

commit sha d634ed3850ff1980f21590eee051d4428acf4601

Removed unnecessary not nil check in node registration process

view details

Manuel Rüger

commit sha eb6c7169276a1978b851deafb25b507caf696ac4

PodTolerationRestriction: Mention Whitelist Scope in Error Currently it's not clear if the issue came from the namespace whitelist of if the namespace whitelist was not applied at all (i.e. via a misspelled annotation). This makes the error more explicit if the pod tolerations caused a conflict with cluster-level or namespace-level whitelist. Signed-off-by: Manuel Rüger <manuel@rueg.eu>

view details

Gaurav Singh

commit sha 862c30a2284a54a8c91778828b41f157b6a506ec

[Provider/Azure] optimize mutex locks

view details

Seth Pollack

commit sha 75af2fca6125516dff42e9825ceea89367986f78

add labels to diff command

view details

Paulo Gomes

commit sha e7ced21235820139afc8dbb2e99314b9b69ec7fa

Invert error validation

view details

junxu

commit sha c58959c8ba7819345d5cc2b17ce4e95ccbc92d5b

Fix code style

view details

liuxu

commit sha 2367569f138ddb35385aed5e7e485eed425c73a9

fix if don't set ephemeral-storage limit emptyDir's sizeLimit doesn't work

view details

tahsinrahman

commit sha 201f869c66391a14c39a73c8745789f24458b99f

Add --logging-format flag for kube-apiserver

view details

SataQiu

commit sha 17f3cd48a54483b4c6b7dc1d742194a1f41daf0a

add '--logging-format' flag to kube-controller-manager Signed-off-by: SataQiu <1527062125@qq.com>

view details

Marcin Maciaszczyk

commit sha e5af792ad29fdbd8f401b5d0d78e8fb0d64c1fe6

Bump Dashboard to v2.0.1

view details

lo24

commit sha cda593e822d2e03f621167f007c183faf5b1d910

fix TestValidateNodeIPParam: break was being used instead of continue

view details

Gaurav Singh

commit sha adcd8909fbbfd399af3983ced92fc743347e96fe

cleanup: Remove_unnecessary_Sprintfs Removed unused fmt Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

view details

Dan Winship

commit sha ddebbfd806b5813cc0f6d67ae9608be393729922

update for APIs being moved to utilnet Several of the functions in pkg/registry/core/service/ipallocator were moved to k8s.io/utils/net, but then the original code was never updated to used to the vendored versions. (utilnet's version of RangeSize does not have the IPv6 special case that the original code did, so we need to move that to NewAllocatorCIDRRange now.)

view details

Dan Winship

commit sha 4a7c86c105f49972a5d7b8150cdba59eafb8a0fd

make test a bit more generic

view details

Dan Winship

commit sha f6dcc1c07e0a2d3c583cb90e1cdb7ec4718625ce

Minor tweak to IPv6 service IP allocation The service allocator skips the "broadcast address" in the service CIDR, but that concept only applies to IPv4 addressing.

view details

Dan Winship

commit sha 9b3a4bb411a1134395370f1ba54daa734f043b6c

api: update Service.Spec.IPFamily docs

view details

push time in 2 days

issue openedkubernetes/kubernetes

Add AddFieldLabelConversionsForEvent for new events/{v1beta1, v1} conversions

What happened:

We're missing for events/v1 and events/v1beta1.

What you expected to happen:

We should add a similar function as introduced in core/v1: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/v1/conversion.go#L449

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

created time in 2 days

issue commentkubernetes/kubernetes

[Failing test] kubeadm-kinder-master (ci-kubernetes-e2e-kubeadm-kinder-master)

Hi @neolit123, The two commits about events were from #92662, which simply replaced all usage of events/v1beta1 in to events/v1, there's nothing about kubeadm, so it should be irrelevant.

sayanchowdhury

comment created time in 3 days

pull request commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

/retest

chelseychen

comment created time in 6 days

pull request commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

/retest

chelseychen

comment created time in 6 days

pull request commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

/retest

chelseychen

comment created time in 6 days

push eventchelseychen/kubernetes

wawa0210

commit sha 7d8aae51df4f318b71dc3b790dd01d0bcb79c5dd

fix pkg/controller/deployment staticcheck

view details

Rostislav M. Georgiev

commit sha 9d6e2b923a5309df75d378639303a4fdc29b97a0

kubeadm upgrade plan: Use internal types of the output API `kubeadm upgrade plan` is using the external (currently `v1alpha1`) types of the kubeadm output API to collect upgrade plans. This is counter intuitive since code structure gets bound to the whatever version the output API is at. In addition to that, the versioned API is used only in the very last stages of a machine readable output (which is currently not implemented). Hence, to increase flexibility and keep up with the standard Kubernetes ecosystem practice, `kubeadm upgrade plan` is migrated to use the internal types of the output API. Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>

view details

Rostislav M. Georgiev

commit sha 709e3c3a8360e805266b745b23187092a5444ca2

kubeadm upgrade plan: component config state table This change enables kubeadm upgrade plan to print a state table with information regarding known component config API groups. Most importantly this information includes current and preferred version for each group and an indication if a manual user upgrade is required. Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>

view details

Roy Yang

commit sha f86b720cf619fed82342ac81c1ae7f460e927460

Update the COS E2E image policy Signed-off-by: Roy Yang <royyang@google.com>

view details

SataQiu

commit sha 770706ce619e02df022a621f03c633767ac3ba9d

add '--logging-format' flag to kube-scheduler

view details

Hemant Kumar

commit sha 7d6959ce2ce49fa5b37b3aa28d20fdeb01c02223

Add extra fields in node expansion CSI call

view details

Hemant Kumar

commit sha 75e13e370e48a0880ad7ab46191723f9f150cebc

Supply staging path for block expansion

view details

Hemant Kumar

commit sha 69613da0ae9743397ba7b2b3daebdc18d68e795e

rename volumeid to volumeID

view details

amash

commit sha ba8189a4f2bc48651463ab9afe39de1860ffcf57

add --logging-format flag to kubelet

view details

amash

commit sha ac8d2e897876c3c823a91ce4ab9ae2a908aff8e3

add loggingConfig struct to kubelet config

view details

amash

commit sha 3ab25f18766d83ca56672880aae77fa4cece0e91

add LoggingConfiguration struct to component-base/config

view details

Hemant Kumar

commit sha 6342dad709626dcc6da600b33f50a29a33525868

Ensure that StagingPath is supplied to blockVolume expansion

view details

amash

commit sha b92b04e7cd754efbf223adf4a8496a497ad8a243

add default for loggingconfiguration struct

view details

Lubomir I. Ivanov

commit sha f66513d98a7759ece08b67e0c173f30a96b5591e

kubeadm: add --port=0 for kube-controller-manager and kube-scheduler Kubeadm setup of kube-controller-manager and kube-scheduler is lacking the --port=0 option which caused the component to enable the insecure port by default and serve insecurely on the default node interface. Add --port=0 by default to both components. Users are still allowed the explicitly set the flag (via extraArgs), which allows them to override this default kubeadm behavior and enable the insecure port. NOTE: the flag is deprecated and should be removed from kubeadm manifests once it's removed from core.

view details

Jing Xu

commit sha 57d0dc540d16a4e72076e10fdf8e0bcaebb9f335

Add csi-proxy installation into node setup script This PR follows the same step to install and start csi-proxy as kubelet binary

view details

Andrea Nodari

commit sha a759fb20ffd31bf26c6223d3833cfd20c5ffe694

Create nodes with labels instead of adding them later

view details

zhouya0

commit sha abad08d915531a6f8686f58a8cb41395ed77c714

Change kubectl list option stdout

view details

wawa0210

commit sha 9d1948a2f52b29880046337accd05a029f225cc2

fix test/e2e/apps staticcheck

view details

Kubernetes Prow Robot

commit sha 13a4a71e993c08ee80574ec53b48a2b8d684a478

Merge pull request #91532 from afrouzMashaykhi/log-flag-kubelet add --logging-format flag to kubelet

view details

Kubernetes Prow Robot

commit sha dbf6c456a29589eba5bc2f96c08d558dcf6b5f85

Merge pull request #91835 from jingxu97/June/csi Add csi-proxy installation into node setup script

view details

push time in 7 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

/retest

chelseychen

comment created time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha cc2466c74c9b46c3044995167bb380f0b6613eca

Promote Event CRUD tests to conformance

view details

push time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 764f7997ecc86cd461b0d9043e4316cfd1dbb667

Promote Event CRUD tests to conformance

view details

push time in 7 days

Pull request review commentkubernetes/kubernetes

Switch event recorder to use events.k8s.io/v1

 type eventKey struct { type eventBroadcasterImpl struct { 	*watch.Broadcaster 	mu            sync.Mutex-	eventCache    map[eventKey]*v1beta1.Event+	eventCache    map[eventKey]*eventsv1.Event 	sleepDuration time.Duration 	sink          EventSink } -// EventSinkImpl wraps EventInterface to implement EventSink.+// EventSinkImpl wraps EventsV1Interface to implement EventSink. // TODO: this makes it easier for testing purpose and masks the logic of performing API calls. // Note that rollbacking to raw clientset should also be transparent. type EventSinkImpl struct {-	Interface typedv1beta1.EventInterface+	Interface typedeventsv1.EventsV1Interface } -// Create is the same as CreateWithEventNamespace of the EventExpansion-func (e *EventSinkImpl) Create(event *v1beta1.Event) (*v1beta1.Event, error) {-	return e.Interface.CreateWithEventNamespace(event)+// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.+func (e *EventSinkImpl) Create(event *eventsv1.Event) (*eventsv1.Event, error) {+	if event.Namespace == "" {+		return nil, fmt.Errorf("can't create an event with empty namespace")+	}+	return e.Interface.Events(event.Namespace).Create(context.TODO(), event, metav1.CreateOptions{}) } -// Update is the same as UpdateithEventNamespace of the EventExpansion-func (e *EventSinkImpl) Update(event *v1beta1.Event) (*v1beta1.Event, error) {-	return e.Interface.UpdateWithEventNamespace(event)+// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.+func (e *EventSinkImpl) Update(event *eventsv1.Event) (*eventsv1.Event, error) {+	if event.Namespace == "" {+		return nil, fmt.Errorf("can't update an event with empty namespace")+	}+	return e.Interface.Events(event.Namespace).Update(context.TODO(), event, metav1.UpdateOptions{}) } -// Patch is the same as PatchWithEventNamespace of the EventExpansion-func (e *EventSinkImpl) Patch(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) {-	return e.Interface.PatchWithEventNamespace(event, data)+// Patch applies the patch and returns the patched event.

Done.

chelseychen

comment created time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha ade242288346d968ab97f42ffb30e0855e235afc

Switch event recorder to use events.k8s.io/v1

view details

Chelsey Chen

commit sha e54ad20f057f1ca4e94552b9373f2762a39b3fd2

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 3217322ddab18379086f3a0c5c229c6e3eb8849b

Switch event recorder to use events.k8s.io/v1

view details

Chelsey Chen

commit sha e95050c45d3af883da0f8d98ee5b5556153e0624

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 39d6a4644cc4e37a34264d0e2374cc703b04e15f

Switch event recorder to use events.k8s.io/v1

view details

Chelsey Chen

commit sha 1ae54039af543a764d363fef35ee3ec7a724067d

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 7 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

/retest

chelseychen

comment created time in 7 days

Pull request review commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

 var _ = common.SIGDescribe("Events API", func() { 		The event is patched with a new note, the check MUST have the update note. 		The event is deleted and MUST NOT show up when listing all events. 	*/-	ginkgo.It("should ensure that an event can be fetched, patched, deleted, and listed", func() {+	framework.ConformanceIt("should ensure that an event can be fetched, patched, deleted, and listed", func() {

Done.

chelseychen

comment created time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 61bb75089f6956d3540ce85b3433febc8d3d3345

Promote Event CRUD tests to conformance

view details

push time in 7 days

Pull request review commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

 var _ = common.SIGDescribe("Events API", func() { 		framework.ExpectEqual(foundCreatedEvent, false, "should not have found test event after deletion") 	}) -	ginkgo.It("should delete a collection of events", func() {+	framework.ConformanceIt("should delete a collection of events", func() {

Done.

chelseychen

comment created time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha ea9a5baba2164af5f26355625c50daa4e0ad54c8

Switch event recorder to use events.k8s.io/v1

view details

Chelsey Chen

commit sha bb1104098f712fc2e05f9bcfaa7121a4b786e7ea

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 7 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 2cc94ee8471fc2dec8e9201f3af07400297abd0e

Switch event recorder to use events.k8s.io/v1

view details

Chelsey Chen

commit sha b07901de3621ab621b7c86496a1b0a72ce11ae2f

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 7 days

push eventchelseychen/kubernetes

Patrick Ohly

commit sha c20721aa9f0a69f267f899ca387fdc489cfe6f24

storage: enhance test for ValidateCSIDriverUpdate This revised test changes one field at a time in various ways. This ensures that one failure reason doesn't mask the other. An incorrect comment also gets fixed. Suggested in https://github.com/kubernetes/kubernetes/pull/80568#pullrequestreview-272836101.

view details

Claudiu Belu

commit sha 31ea600b284515dd3470b244f9c6e1548408ecfe

images: Adds GOARM to images' Makefiles In order to build the image binaries, the GOARM variable is required, but not all Makefiles have it defined, causing the make to fail on those images. This adds the require GOARM variable to the Makefiles in question.

view details

Alena Prokharchyk

commit sha d634ed3850ff1980f21590eee051d4428acf4601

Removed unnecessary not nil check in node registration process

view details

Manuel Rüger

commit sha eb6c7169276a1978b851deafb25b507caf696ac4

PodTolerationRestriction: Mention Whitelist Scope in Error Currently it's not clear if the issue came from the namespace whitelist of if the namespace whitelist was not applied at all (i.e. via a misspelled annotation). This makes the error more explicit if the pod tolerations caused a conflict with cluster-level or namespace-level whitelist. Signed-off-by: Manuel Rüger <manuel@rueg.eu>

view details

Gaurav Singh

commit sha 862c30a2284a54a8c91778828b41f157b6a506ec

[Provider/Azure] optimize mutex locks

view details

Seth Pollack

commit sha 75af2fca6125516dff42e9825ceea89367986f78

add labels to diff command

view details

Paulo Gomes

commit sha e7ced21235820139afc8dbb2e99314b9b69ec7fa

Invert error validation

view details

junxu

commit sha c58959c8ba7819345d5cc2b17ce4e95ccbc92d5b

Fix code style

view details

liuxu

commit sha 2367569f138ddb35385aed5e7e485eed425c73a9

fix if don't set ephemeral-storage limit emptyDir's sizeLimit doesn't work

view details

SataQiu

commit sha 17f3cd48a54483b4c6b7dc1d742194a1f41daf0a

add '--logging-format' flag to kube-controller-manager Signed-off-by: SataQiu <1527062125@qq.com>

view details

Marcin Maciaszczyk

commit sha e5af792ad29fdbd8f401b5d0d78e8fb0d64c1fe6

Bump Dashboard to v2.0.1

view details

lo24

commit sha cda593e822d2e03f621167f007c183faf5b1d910

fix TestValidateNodeIPParam: break was being used instead of continue

view details

Dan Winship

commit sha ddebbfd806b5813cc0f6d67ae9608be393729922

update for APIs being moved to utilnet Several of the functions in pkg/registry/core/service/ipallocator were moved to k8s.io/utils/net, but then the original code was never updated to used to the vendored versions. (utilnet's version of RangeSize does not have the IPv6 special case that the original code did, so we need to move that to NewAllocatorCIDRRange now.)

view details

Dan Winship

commit sha 4a7c86c105f49972a5d7b8150cdba59eafb8a0fd

make test a bit more generic

view details

Dan Winship

commit sha f6dcc1c07e0a2d3c583cb90e1cdb7ec4718625ce

Minor tweak to IPv6 service IP allocation The service allocator skips the "broadcast address" in the service CIDR, but that concept only applies to IPv4 addressing.

view details

Lubomir I. Ivanov

commit sha 7ddd966ed2038133dce3f93a062a9da1cb809088

kubeadm: mark --experimental-kustomize as deprecated

view details

SataQiu

commit sha 800dd19fc23f14f9e83f09ff40155395af9f7cb0

increase robustness for kubeadm etcd operations Signed-off-by: SataQiu <1527062125@qq.com>

view details

David Eads

commit sha 7f172286342c4238d4b636c113d35835ff9299ee

prevent panic in azure cloud provider from killing the process

view details

Antonio Ojea

commit sha 069707f75a14b9c98538755b089a123192bb0368

refactor and instrument range_allocator cidr_sets refactor and add the following metrics to the cidr_sets used by the range allocator:, under the subsystem: node_ipam_controller cidrset_cidrs_allocations_total cidrset_cidrs_releases_total cidrset_usage_cidrs cidrset_allocation_tries_per_request

view details

Yan Yao

commit sha cef787695235fb0fee1783f9e68edbc345147801

Fix golint failures in pkg/kubelet/lifecycle Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

view details

push time in 7 days

pull request commentkubernetes/kubernetes

Promote Event CRUD tests to conformance

/assign @wojtek-t /cc @liggitt

chelseychen

comment created time in 8 days

PR opened kubernetes/kubernetes

Promote Event CRUD tests to conformance

What type of PR is this?

/kind api-change

What this PR does / why we need it:

The new Event API has been graduated to v1, now its CRUD tests should also be promoted to conformance.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: <https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/383-new-event-api-ga-graduation>
+13 -13

0 comment

2 changed files

pr created time in 8 days

create barnchchelseychen/kubernetes

branch : event-e2e-conformance

created branch time in 8 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

@wojtek-t Sorry I made a mistake commit to this PR which caused LGTM label being removed. Could you add the label again? Thanks!

chelseychen

comment created time in 8 days

push eventchelseychen/kubernetes

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 142a15ad62ad183a68a1cdba18c544d2236b1b9c

Promote Event CRUD tests to conformance

view details

push time in 8 days

push eventchelseychen/kubernetes

SataQiu

commit sha 17f3cd48a54483b4c6b7dc1d742194a1f41daf0a

add '--logging-format' flag to kube-controller-manager Signed-off-by: SataQiu <1527062125@qq.com>

view details

Lubomir I. Ivanov

commit sha 7ddd966ed2038133dce3f93a062a9da1cb809088

kubeadm: mark --experimental-kustomize as deprecated

view details

David Eads

commit sha 7f172286342c4238d4b636c113d35835ff9299ee

prevent panic in azure cloud provider from killing the process

view details

Jordan Liggitt

commit sha 30e39c71e2e5c5d6bb3fd64c71571a04beef5368

Add deprecated, deprecationWarning fields to CRDs

view details

wawa0210

commit sha d360be0f7c3049036297b688134be6ea45ae17b8

fix pkg/controller/statefulset staticcheck

view details

Lubomir I. Ivanov

commit sha a8b31556c8e54212b4181a02dcfa977f5769f5ad

kubeadm: add the --experimental-patches flag in cmd/options

view details

Lubomir I. Ivanov

commit sha 5506049b873304a84fc7e5318385cc664caa907d

kubeadm: add logic for patching components in util/patches

view details

Lubomir I. Ivanov

commit sha 144778db8373ae1a9c56df228153d5c136617783

kubeadm: plumb the patches option trough init/join/upgrade This changes adds the "patches" option in all places where the "kustomize" option is already present.

view details

Lubomir I. Ivanov

commit sha ceb768ccbde7a84782696bc46fa06b2a32c9fa0f

kubeadm: apply patches to static Pods Add PatchStaticPod() in staticpod/utils.go Apply patches to static Pods in: - phases/controlplane/CreateStaticPodFiles() - phases/etcd/CreateLocalEtcdStaticPodManifestFile() and CreateStackedEtcdStaticPodManifestFile() Add unit tests and update Bazel.

view details

Stephen Heywood

commit sha 2eabf97a58cdb9c3f22e08693dd6d5db95155802

Ensure request returns current server version

view details

Stephen Heywood

commit sha 878bc969a4c91a0eef7cc6fd6b674e63aa6f7e0f

Include dependency for pkg/version

view details

Roy Yang

commit sha 1b13308edb25e580fb188377e308fea4db56faf0

Fix sig-node-containerd/containerd-e2e-gci Signed-off-by: Roy Yang <royyang@google.com>

view details

Benjamin Elder

commit sha 3a531edbd116d47ab1fa8eef4e2821b6f5d0ea10

rmmh is no longer active

view details

Benjamin Elder

commit sha 839223f6c861d18aba143eb30fe5339a6a3f0fd2

Katharine is no longer active

view details

Benjamin Elder

commit sha 62eb860ddff8fa5ce3d92ed10c75a4cfb411d582

spiffxp should be a cluster reviewer

view details

Benjamin Elder

commit sha 7dfe160c0cac027a1da833c75fc4d6433de32a76

sort cluster/ OWNERS

view details

Benjamin Elder

commit sha 71c2b825e29378573650a63fa7c255b4508dc0b1

BenTheElder approves test/ I've been a reviewer / approver via teh sig-testing alias here, but that's opaque and I review & approve a lot of these, making it explicit.

view details

Marek Siarkowicz

commit sha e72521e1d7e2eef32e78828ab111670fe2f591ae

Update k8s.io/klog to v2.2.0

view details

Vinod K L Swamy

commit sha 4505d5b182c85388627f1b5a648a2da377026871

Changes to Proxy common code

view details

Vinod K L Swamy

commit sha bbd4a07decc7ca2add213cd1c4cc3b5c405e7bfb

Changes to WinKernel to support EndpointSlices

view details

push time in 8 days

pull request commentkubernetes/kubernetes

Switch event recorder to use events.k8s.io/v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

Not sure why /test pull-kubernetes-e2e-kind-ipv6 and retest cannot restart the failing test..

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/test pull-kubernetes-e2e-kind-ipv6

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/test pull-kubernetes-e2e-kind-ipv6

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Switch event recorder to use events.k8s.io/v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/test pull-kubernetes-e2e-kind-ipv6

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest pull-kubernetes-e2e-kind-ipv6

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Switch event recorder to use events.k8s.io/v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

/assign @wojtek-t @liggitt This PR contains two commits from #91645. Once that's merge, I will sync this PR. Right now, the third commit is the new one that needs review. Thanks!

chelseychen

comment created time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 84d56da336b72c3b3d947f35ca00792462af8835

Promote new Event API to v1

view details

Chelsey Chen

commit sha af7a407ba6898699154ab8b7e780dcedce223df0

Auto generated changes

view details

Chelsey Chen

commit sha a86f40dc7cc790c24e87dcae9bcb8a4fb31af775

Switch Event CRUD tests to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Patrick Ohly

commit sha c20721aa9f0a69f267f899ca387fdc489cfe6f24

storage: enhance test for ValidateCSIDriverUpdate This revised test changes one field at a time in various ways. This ensures that one failure reason doesn't mask the other. An incorrect comment also gets fixed. Suggested in https://github.com/kubernetes/kubernetes/pull/80568#pullrequestreview-272836101.

view details

Claudiu Belu

commit sha 31ea600b284515dd3470b244f9c6e1548408ecfe

images: Adds GOARM to images' Makefiles In order to build the image binaries, the GOARM variable is required, but not all Makefiles have it defined, causing the make to fail on those images. This adds the require GOARM variable to the Makefiles in question.

view details

Alena Prokharchyk

commit sha d634ed3850ff1980f21590eee051d4428acf4601

Removed unnecessary not nil check in node registration process

view details

Manuel Rüger

commit sha eb6c7169276a1978b851deafb25b507caf696ac4

PodTolerationRestriction: Mention Whitelist Scope in Error Currently it's not clear if the issue came from the namespace whitelist of if the namespace whitelist was not applied at all (i.e. via a misspelled annotation). This makes the error more explicit if the pod tolerations caused a conflict with cluster-level or namespace-level whitelist. Signed-off-by: Manuel Rüger <manuel@rueg.eu>

view details

Gaurav Singh

commit sha 862c30a2284a54a8c91778828b41f157b6a506ec

[Provider/Azure] optimize mutex locks

view details

Seth Pollack

commit sha 75af2fca6125516dff42e9825ceea89367986f78

add labels to diff command

view details

Paulo Gomes

commit sha e7ced21235820139afc8dbb2e99314b9b69ec7fa

Invert error validation

view details

junxu

commit sha c58959c8ba7819345d5cc2b17ce4e95ccbc92d5b

Fix code style

view details

liuxu

commit sha 2367569f138ddb35385aed5e7e485eed425c73a9

fix if don't set ephemeral-storage limit emptyDir's sizeLimit doesn't work

view details

Marcin Maciaszczyk

commit sha e5af792ad29fdbd8f401b5d0d78e8fb0d64c1fe6

Bump Dashboard to v2.0.1

view details

lo24

commit sha cda593e822d2e03f621167f007c183faf5b1d910

fix TestValidateNodeIPParam: break was being used instead of continue

view details

Dan Winship

commit sha ddebbfd806b5813cc0f6d67ae9608be393729922

update for APIs being moved to utilnet Several of the functions in pkg/registry/core/service/ipallocator were moved to k8s.io/utils/net, but then the original code was never updated to used to the vendored versions. (utilnet's version of RangeSize does not have the IPv6 special case that the original code did, so we need to move that to NewAllocatorCIDRRange now.)

view details

Dan Winship

commit sha 4a7c86c105f49972a5d7b8150cdba59eafb8a0fd

make test a bit more generic

view details

Dan Winship

commit sha f6dcc1c07e0a2d3c583cb90e1cdb7ec4718625ce

Minor tweak to IPv6 service IP allocation The service allocator skips the "broadcast address" in the service CIDR, but that concept only applies to IPv4 addressing.

view details

SataQiu

commit sha 800dd19fc23f14f9e83f09ff40155395af9f7cb0

increase robustness for kubeadm etcd operations Signed-off-by: SataQiu <1527062125@qq.com>

view details

Antonio Ojea

commit sha 069707f75a14b9c98538755b089a123192bb0368

refactor and instrument range_allocator cidr_sets refactor and add the following metrics to the cidr_sets used by the range allocator:, under the subsystem: node_ipam_controller cidrset_cidrs_allocations_total cidrset_cidrs_releases_total cidrset_usage_cidrs cidrset_allocation_tries_per_request

view details

Yan Yao

commit sha cef787695235fb0fee1783f9e68edbc345147801

Fix golint failures in pkg/kubelet/lifecycle Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

view details

Luigi Bitonti

commit sha 51f788c6dc962d3773c92094d0b67cc1da081d49

Add ebtables rule delete function + broute table + brouting chain

view details

pigletfly

commit sha 0665ff163af767cdddbb686d1fb053a2b1f73666

fix receiver name

view details

Davanum Srinivas

commit sha 2d7c47d2be5364679763dbfdd1867586828822a9

Additional test for loading images with containerd Signed-off-by: Davanum Srinivas <davanum@gmail.com>

view details

push time in 8 days

PR opened kubernetes/kubernetes

Update Event CRUD tests to use events.k8s.io/v1

What type of PR is this?

/kind api-change

What this PR does / why we need it:

This PR update CRUD tests for new Events API verbs to use events/v1.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: <https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/383-new-event-api-ga-graduation>
+6359 -387

0 comment

75 changed files

pr created time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 75612c17461fe81fb969768e12ca52bfb22f745d

Promote new Event API to v1

view details

Chelsey Chen

commit sha c90330d8f4ca9fd980df24044960a4d8bb28a780

Auto generated changes

view details

Chelsey Chen

commit sha 4534a68683ad24d71e12acbf02c452e994f04d86

Add CRUD tests for new Event API verbs

view details

Chelsey Chen

commit sha 0e35e6dbb67f8c51319225af9dd2e700b54df13a

Switch Event CRUD tests to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 8d5ed623d78d5f6bb91d5ef09389edfa09f6b336

Remove DeprecatedSource assignment to avoid validation failure

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 2c91d917f15222bfe8fd58f70df0d7bbca471930

Auto generated changes

view details

Chelsey Chen

commit sha 7060709850b41bd443e535bc63c2a641e2509540

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 129c0e664a48736f53f08e9c2eddf76722089012

Auto generated changes

view details

Chelsey Chen

commit sha 39d00c28407a30bde85a205142a1eb7d2ad91d7e

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Promote new Event API to v1

/retest

chelseychen

comment created time in 8 days

pull request commentkubernetes/kubernetes

Add CRUD tests for new Events API verbs

/retest

chelseychen

comment created time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 717995b77d953f30e3231ed4cb292bbc3c21a90e

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 601510061220f048d5c41bdb34bc2422cc1a0a7c

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha c9c76f7cbd5099389de0fe4c7841f36b9bb34b49

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 75612c17461fe81fb969768e12ca52bfb22f745d

Promote new Event API to v1

view details

Chelsey Chen

commit sha c90330d8f4ca9fd980df24044960a4d8bb28a780

Auto generated changes

view details

Chelsey Chen

commit sha ec38bc47f657f891da230e5d75164fd33fa85dbb

Promote new Event API to v1

view details

Chelsey Chen

commit sha 6f2ae75238e0ce62caa17f1271828dd905196d2d

Auto generated changes

view details

Chelsey Chen

commit sha 8eb0361d610a817f6ebbedfdc801476b978ab74f

Switch event recorder to use events.k8s.io/v1

view details

push time in 8 days

Pull request review commentkubernetes/kubernetes

Add CRUD tests for new Events API verbs

+/*+Copyright 2020 The Kubernetes Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package instrumentation++import (+	"context"+	"encoding/json"+	"fmt"+	"time"++	"k8s.io/api/core/v1"+	eventsv1beta1 "k8s.io/api/events/v1beta1"+	apiequality "k8s.io/apimachinery/pkg/api/equality"+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"+	"k8s.io/apimachinery/pkg/util/diff"+	typedeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"+	"k8s.io/kubernetes/test/e2e/framework"+	"k8s.io/kubernetes/test/e2e/instrumentation/common"++	"github.com/onsi/ginkgo"+	"k8s.io/apimachinery/pkg/types"+)++func newTestEvent(namespace, name, label string) *eventsv1beta1.Event {+	someTime := metav1.MicroTime{Time: time.Unix(1505828956, 0)}+	return &eventsv1beta1.Event{+		ObjectMeta: metav1.ObjectMeta{+			Name: name,+			Labels: map[string]string{+				label: "true",+			},+		},+		Regarding: v1.ObjectReference{+			Namespace: namespace,+		},+		EventTime:           someTime,+		Note:                "This is " + name,+		Action:              "Do",+		Reason:              "Test",+		Type:                "Normal",+		ReportingController: "test-controller",+		ReportingInstance:   "test-node",+	}+}++func eventExistsInList(client typedeventsv1beta1.EventInterface, namespace, name string) bool {+	eventsList, err := client.List(context.TODO(), metav1.ListOptions{+		LabelSelector: "testevent-constant=true",+	})+	framework.ExpectNoError(err, "failed to list events")++	for _, val := range eventsList.Items {+		if val.ObjectMeta.Name == name && val.ObjectMeta.Namespace == namespace {+			return true+		}+	}+	return false+}++var _ = common.SIGDescribe("Events API", func() {+	f := framework.NewDefaultFramework("events")+	var client typedeventsv1beta1.EventInterface+	var clientAllNamespaces typedeventsv1beta1.EventInterface++	ginkgo.BeforeEach(func() {+		client = f.ClientSet.EventsV1beta1().Events(f.Namespace.Name)+		clientAllNamespaces = f.ClientSet.EventsV1beta1().Events(metav1.NamespaceAll)+	})++	/*+		Release : v1.19+		Testname: Event resource lifecycle+		Description: Create an event, the event MUST exist.+		The event is patched with a new note, the check MUST have the update note.+		The event is deleted and MUST NOT show up when listing all events.+	*/+	ginkgo.It("should ensure that an event can be fetched, patched, deleted, and listed", func() {+		eventName := "event-test"++		ginkgo.By("creating a test event")+		_, err := client.Create(context.TODO(), newTestEvent(f.Namespace.Name, eventName, "testevent-constant"), metav1.CreateOptions{})+		framework.ExpectNoError(err, "failed to create test event")++		ginkgo.By("listing events in all namespaces")+		foundCreatedEvent := eventExistsInList(clientAllNamespaces, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with cluster scope")++		ginkgo.By("listing events in test namespace")+		foundCreatedEvent = eventExistsInList(client, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with namespace scope")++		ginkgo.By("getting the test event")+		testEvent, err := client.Get(context.TODO(), eventName, metav1.GetOptions{})+		framework.ExpectNoError(err, "failed to get test event")++		ginkgo.By("patching the test event")+		eventPatchNote := "This is a test event - patched"+		eventPatch, err := json.Marshal(map[string]interface{}{+			"note": eventPatchNote,+		})+		framework.ExpectNoError(err, "failed to marshal the patch JSON payload")++		_, err = client.Patch(context.TODO(), eventName, types.StrategicMergePatchType, []byte(eventPatch), metav1.PatchOptions{})+		framework.ExpectNoError(err, "failed to patch the test event")++		ginkgo.By("getting the test event")+		event, err := client.Get(context.TODO(), eventName, metav1.GetOptions{})+		framework.ExpectNoError(err, "failed to get test event")+		// clear ResourceVersion field which is on API calls+		event.ObjectMeta.ResourceVersion = ""+		testEvent.Note = eventPatchNote+		if !apiequality.Semantic.DeepEqual(testEvent, event) {

Done.

chelseychen

comment created time in 9 days

Pull request review commentkubernetes/kubernetes

Promote new Event API to v1

 package validation  import ( 	"fmt"+	"reflect" 	"time" +	"k8s.io/api/core/v1"+	apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"+	"k8s.io/apimachinery/pkg/runtime/schema" 	"k8s.io/apimachinery/pkg/util/validation" 	"k8s.io/apimachinery/pkg/util/validation/field" 	"k8s.io/kubernetes/pkg/apis/core"+	eventsv1beta1 "k8s.io/kubernetes/pkg/apis/events/v1beta1"

Got it, thanks!

chelseychen

comment created time in 9 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 75612c17461fe81fb969768e12ca52bfb22f745d

Promote new Event API to v1

view details

Chelsey Chen

commit sha c90330d8f4ca9fd980df24044960a4d8bb28a780

Auto generated changes

view details

push time in 9 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha e5bba7f512166a436c98ba77eaeae87f1f4d7ef1

Add CRUD tests for new Event API verbs

view details

push time in 9 days

Pull request review commentkubernetes/kubernetes

Add CRUD tests for new Events API verbs

+/*+Copyright 2020 The Kubernetes Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package instrumentation++import (+	"context"+	"encoding/json"+	"fmt"+	"time"++	"k8s.io/api/core/v1"+	eventsv1beta1 "k8s.io/api/events/v1beta1"+	apiequality "k8s.io/apimachinery/pkg/api/equality"+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"+	"k8s.io/apimachinery/pkg/util/diff"+	typedeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"+	"k8s.io/kubernetes/test/e2e/framework"+	"k8s.io/kubernetes/test/e2e/instrumentation/common"++	"github.com/onsi/ginkgo"+	"k8s.io/apimachinery/pkg/types"+)++func newTestEvent(namespace, name, label string) *eventsv1beta1.Event {+	someTime := metav1.MicroTime{Time: time.Unix(1505828956, 0)}+	return &eventsv1beta1.Event{+		ObjectMeta: metav1.ObjectMeta{+			Name: name,+			Labels: map[string]string{+				label: "true",+			},+		},+		Regarding: v1.ObjectReference{+			Namespace: namespace,+		},+		EventTime:           someTime,+		Note:                "This is " + name,+		Action:              "Do",+		Reason:              "Test",+		Type:                "Normal",+		ReportingController: "test-controller",+		ReportingInstance:   "test-node",+	}+}++func eventExistsInList(client typedeventsv1beta1.EventInterface, namespace, name string) bool {+	eventsList, err := client.List(context.TODO(), metav1.ListOptions{+		LabelSelector: "testevent-constant=true",+	})+	framework.ExpectNoError(err, "failed to list events")++	for _, val := range eventsList.Items {+		if val.ObjectMeta.Name == name && val.ObjectMeta.Namespace == namespace {+			return true+		}+	}+	return false+}++var _ = common.SIGDescribe("Events API", func() {+	f := framework.NewDefaultFramework("events")+	var client typedeventsv1beta1.EventInterface+	var clientAllNamespaces typedeventsv1beta1.EventInterface++	ginkgo.BeforeEach(func() {+		client = f.ClientSet.EventsV1beta1().Events(f.Namespace.Name)+		clientAllNamespaces = f.ClientSet.EventsV1beta1().Events(metav1.NamespaceAll)+	})++	/*+		Release : v1.19+		Testname: Event resource lifecycle+		Description: Create an event, the event MUST exist.+		The event is patched with a new note, the check MUST have the update note.+		The event is deleted and MUST NOT show up when listing all events.+	*/+	ginkgo.It("should ensure that an event can be fetched, patched, deleted, and listed", func() {+		eventName := "event-test"+		testEvent := newTestEvent(f.Namespace.Name, eventName, "testevent-constant")++		ginkgo.By("creating a test event")+		_, err := client.Create(context.TODO(), testEvent, metav1.CreateOptions{})+		framework.ExpectNoError(err, "failed to create test event")++		ginkgo.By("listing events in all namespaces")+		foundCreatedEvent := eventExistsInList(clientAllNamespaces, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with cluster scope")++		ginkgo.By("listing events in test namespace")+		foundCreatedEvent = eventExistsInList(client, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with namespace scope")++		ginkgo.By("patching the test event")+		eventPatchNote := "This is a test event - patched"+		eventPatch, err := json.Marshal(map[string]interface{}{+			"note": eventPatchNote,+		})+		framework.ExpectNoError(err, "failed to marshal the patch JSON payload")++		_, err = client.Patch(context.TODO(), eventName, types.StrategicMergePatchType, []byte(eventPatch), metav1.PatchOptions{})+		framework.ExpectNoError(err, "failed to patch the test event")++		ginkgo.By("getting the test event")+		event, err := client.Get(context.TODO(), eventName, metav1.GetOptions{})+		framework.ExpectNoError(err, "failed to get test event")+		event.ObjectMeta = testEvent.ObjectMeta

Emm I changed my mind - I think it might be better to include ObjectMeta, so I get testEvent after creation. Hope this can pass the test. Please correct me if I'm wrong.

chelseychen

comment created time in 9 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 3abe3e3720940ba2a7ab37d1fa0bdce7238837fc

Add CRUD tests for new Event API verbs

view details

push time in 9 days

Pull request review commentkubernetes/kubernetes

Add CRUD tests for new Events API verbs

+/*+Copyright 2020 The Kubernetes Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package instrumentation++import (+	"context"+	"encoding/json"+	"fmt"+	"time"++	"k8s.io/api/core/v1"+	eventsv1beta1 "k8s.io/api/events/v1beta1"+	apiequality "k8s.io/apimachinery/pkg/api/equality"+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"+	"k8s.io/apimachinery/pkg/util/diff"+	typedeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"+	"k8s.io/kubernetes/test/e2e/framework"+	"k8s.io/kubernetes/test/e2e/instrumentation/common"++	"github.com/onsi/ginkgo"+	"k8s.io/apimachinery/pkg/types"+)++func newTestEvent(namespace, name, label string) *eventsv1beta1.Event {+	someTime := metav1.MicroTime{Time: time.Unix(1505828956, 0)}+	return &eventsv1beta1.Event{+		ObjectMeta: metav1.ObjectMeta{+			Name: name,+			Labels: map[string]string{+				label: "true",+			},+		},+		Regarding: v1.ObjectReference{+			Namespace: namespace,+		},+		EventTime:           someTime,+		Note:                "This is " + name,+		Action:              "Do",+		Reason:              "Test",+		Type:                "Normal",+		ReportingController: "test-controller",+		ReportingInstance:   "test-node",+	}+}++func eventExistsInList(client typedeventsv1beta1.EventInterface, namespace, name string) bool {+	eventsList, err := client.List(context.TODO(), metav1.ListOptions{+		LabelSelector: "testevent-constant=true",+	})+	framework.ExpectNoError(err, "failed to list events")++	for _, val := range eventsList.Items {+		if val.ObjectMeta.Name == name && val.ObjectMeta.Namespace == namespace {+			return true+		}+	}+	return false+}++var _ = common.SIGDescribe("Events API", func() {+	f := framework.NewDefaultFramework("events")+	var client typedeventsv1beta1.EventInterface+	var clientAllNamespaces typedeventsv1beta1.EventInterface++	ginkgo.BeforeEach(func() {+		client = f.ClientSet.EventsV1beta1().Events(f.Namespace.Name)+		clientAllNamespaces = f.ClientSet.EventsV1beta1().Events(metav1.NamespaceAll)+	})++	/*+		Release : v1.19+		Testname: Event resource lifecycle+		Description: Create an event, the event MUST exist.+		The event is patched with a new note, the check MUST have the update note.+		The event is deleted and MUST NOT show up when listing all events.+	*/+	ginkgo.It("should ensure that an event can be fetched, patched, deleted, and listed", func() {+		eventName := "event-test"+		testEvent := newTestEvent(f.Namespace.Name, eventName, "testevent-constant")++		ginkgo.By("creating a test event")+		_, err := client.Create(context.TODO(), testEvent, metav1.CreateOptions{})+		framework.ExpectNoError(err, "failed to create test event")++		ginkgo.By("listing events in all namespaces")+		foundCreatedEvent := eventExistsInList(clientAllNamespaces, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with cluster scope")++		ginkgo.By("listing events in test namespace")+		foundCreatedEvent = eventExistsInList(client, f.Namespace.Name, eventName)+		framework.ExpectEqual(foundCreatedEvent, true, "failed to find test event in list with namespace scope")++		ginkgo.By("patching the test event")+		eventPatchNote := "This is a test event - patched"+		eventPatch, err := json.Marshal(map[string]interface{}{+			"note": eventPatchNote,+		})+		framework.ExpectNoError(err, "failed to marshal the patch JSON payload")++		_, err = client.Patch(context.TODO(), eventName, types.StrategicMergePatchType, []byte(eventPatch), metav1.PatchOptions{})+		framework.ExpectNoError(err, "failed to patch the test event")++		ginkgo.By("getting the test event")+		event, err := client.Get(context.TODO(), eventName, metav1.GetOptions{})+		framework.ExpectNoError(err, "failed to get test event")+		event.ObjectMeta = testEvent.ObjectMeta

@wojtek-t Looks like client.Create will add a lot of info into ObjectMeta, which will cause DeepEqual fail. So here I skip the comparison of the whole ObjectMeta. I'm not sure if this is the best way to do it. Or maybe it's better to get the event after client.Create and compare that with patched event?

chelseychen

comment created time in 9 days

push eventchelseychen/kubernetes

Chelsey Chen

commit sha 831db182a946b3b037b752d80bc86f2280b80004

Add CRUD tests for new Event API verbs

view details

push time in 9 days

more