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

Add conformance test for setting user #3423

Merged
merged 1 commit into from
Mar 27, 2019

Conversation

dgerd
Copy link

@dgerd dgerd commented Mar 13, 2019

This change adds a conformance test to validate that a user set in the
securityContext is reflected in the container. This change also adds the
group information to the runtime test image, but we do not validate this
as 1. it is not currently part of the runtime contract and 2. Setting
group is currently an alpha feature that does not work on many Kubernetes
clusters. See kubernetes/enhancements#213

Related to: #3223

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 13, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@dgerd: 3 warnings.

In response to this:

This change adds a conformance test to validate that a user set in the
securityContext is reflected in the container. This change also adds the
group information to the runtime test image, but we do not validate this
as 1. it is not currently part of the runtime contract and 2. Setting
group is currently an alpha feature that does not work on many Kubernetes
clusters. See kubernetes/enhancements#213

Related to: #3223

Fixes #

Proposed Changes

Release Note


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

test/conformance/user_test.go Outdated Show resolved Hide resolved
test/types/runtime.go Outdated Show resolved Hide resolved
test/types/runtime.go Show resolved Hide resolved
This change adds a conformance test to validate that a user set in the
securityContext is reflected in the container. This change also adds the
group information to the runtime test image, but we do not validate this
as 1. it is not currently part of the runtime contract and 2. Setting
group is currently an alpha feature that does not work on many Kubernetes
clusters. See kubernetes/enhancements#213

Related to: knative#3223
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

Looks good in general.

RunAsUser: &runAsUser,
}

ri, err := fetchRuntimeInfo(t, clients, &test.Options{SecurityContext: securityContext})
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder,
what if we actually create the service and pull all the options in a TestMain and then the tests just verify different pieces of the contract. Or, at least, they are all part of the same test suite with the same TestMain, that creates the service and tests just query the runtime info?

Copy link
Author

Choose a reason for hiding this comment

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

I am happy to look into refactoring this, but would prefer to do it in a separate follow-up PR as it will involve changing the existing tests. I would like to keep this one to strictly be additive of the new test.

@vagababov
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2019
@mattmoor
Copy link
Member

/retest

1 similar comment
@dgerd
Copy link
Author

dgerd commented Mar 14, 2019

/retest

@mattmoor mattmoor added this to the Serving 0.5 milestone Mar 19, 2019
@dgerd
Copy link
Author

dgerd commented Mar 19, 2019

/assign @mattmoor

@mattmoor
Copy link
Member

/approve
/lgtm

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgerd, mattmoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2019
@mattmoor
Copy link
Member

/retest

1 similar comment
@dgerd
Copy link
Author

dgerd commented Mar 21, 2019

/retest

@dgerd
Copy link
Author

dgerd commented Mar 21, 2019

/test pull-knative-serving-integration-tests

@mattmoor
Copy link
Member

e2e failure looks real

@dgerd
Copy link
Author

dgerd commented Mar 22, 2019 via email

@mattmoor
Copy link
Member

/retest

It looks like the -B option is being ignored, so I think Prow is using stale images and a stale ko.

gcr.io/knative-boskos-04/kserving-e2e-img/runtime-4c6a6c31a1e8accf3116970c666c9229:latest should be gcr.io/knative-boskos-04/kserving-e2e-img/runtime:latest if I'm not mistaken...

This is probably related to the move to github.com/google/ko, which inadvertently dropped -B.

@mattmoor
Copy link
Member

/retest

@dgerd
Copy link
Author

dgerd commented Mar 25, 2019

Still not respecting the base option

I0325 22:03:27.667] 2019/03/25 22:03:27 Publishing gcr.io/knative-boskos-18/kserving-e2e-img/runtime-4c6a6c31a1e8accf3116970c666c9229:latest

@dgerd
Copy link
Author

dgerd commented Mar 26, 2019

/retest

3 similar comments
@srinivashegde86
Copy link
Contributor

/retest

@srinivashegde86
Copy link
Contributor

/retest

@mattmoor
Copy link
Member

/retest

@srinivashegde86
Copy link
Contributor

/retest

@mattmoor mattmoor closed this Mar 27, 2019
@mattmoor mattmoor reopened this Mar 27, 2019
@knative-prow-robot knative-prow-robot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Mar 27, 2019
@knative-prow-robot knative-prow-robot merged commit c8ec8b9 into knative:master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants