-
Notifications
You must be signed in to change notification settings - Fork 131
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
fix: adds missing CRDs for k8s EnvTest #584
Merged
VaishnaviHire
merged 3 commits into
opendatahub-io:incubation
from
maistra:fix_crd_for_tests
Oct 2, 2023
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: groups.user.openshift.io | ||
spec: | ||
group: user.openshift.io | ||
names: | ||
kind: Group | ||
listKind: GroupList | ||
plural: groups | ||
singular: group | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: "Group represents a referenceable set of Users \n Compatibility | ||
level 1: Stable within a major release for a minimum of 12 months or 3 minor | ||
releases (whichever is longer)." | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
users: | ||
description: Users is the list of users in this group. | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- users | ||
type: object | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: identities.user.openshift.io | ||
spec: | ||
group: user.openshift.io | ||
names: | ||
kind: Identity | ||
listKind: IdentityList | ||
plural: identities | ||
singular: identity | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: "Identity records a successful authentication of a user with | ||
an identity provider. The information about the source of authentication | ||
is stored on the identity, and the identity is then associated with a single | ||
user object. Multiple identities can reference a single user. Information | ||
retrieved from the authentication provider is stored in the extra field | ||
using a schema determined by the provider. \n Compatibility level 1: Stable | ||
within a major release for a minimum of 12 months or 3 minor releases (whichever | ||
is longer)." | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
extra: | ||
additionalProperties: | ||
type: string | ||
description: Extra holds extra information about this identity | ||
type: object | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
providerName: | ||
description: ProviderName is the source of identity information | ||
type: string | ||
providerUserName: | ||
description: ProviderUserName uniquely represents this identity in the | ||
scope of the provider | ||
type: string | ||
user: | ||
description: User is a reference to the user this identity is associated | ||
with Both Name and UID must be set | ||
properties: | ||
apiVersion: | ||
description: API version of the referent. | ||
type: string | ||
fieldPath: | ||
description: 'If referring to a piece of an object instead of an entire | ||
object, this string should contain a valid JSON/Go field access | ||
statement, such as desiredState.manifest.containers[2]. For example, | ||
if the object reference is to a container within a pod, this would | ||
take on a value like: "spec.containers{name}" (where "name" refers | ||
to the name of the container that triggered the event) or if no | ||
container name is specified "spec.containers[2]" (container with | ||
index 2 in this pod). This syntax is chosen only to have some well-defined | ||
way of referencing a part of an object. TODO: this design is not | ||
final and this field is subject to change in the future.' | ||
type: string | ||
kind: | ||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
name: | ||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' | ||
type: string | ||
namespace: | ||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' | ||
type: string | ||
resourceVersion: | ||
description: 'Specific resourceVersion to which this reference is | ||
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' | ||
type: string | ||
uid: | ||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
required: | ||
- providerName | ||
- providerUserName | ||
- user | ||
type: object | ||
served: true | ||
storage: true |
111 changes: 111 additions & 0 deletions
111
config/crd/external/user.openshift.io_useridentitymappings.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: useridentitymappings.user.openshift.io | ||
spec: | ||
group: user.openshift.io | ||
names: | ||
kind: UserIdentityMapping | ||
listKind: UserIdentityMappingList | ||
plural: useridentitymappings | ||
singular: useridentitymapping | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: "UserIdentityMapping maps a user to an identity \n Compatibility | ||
level 1: Stable within a major release for a minimum of 12 months or 3 minor | ||
releases (whichever is longer)." | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
identity: | ||
description: Identity is a reference to an identity | ||
properties: | ||
apiVersion: | ||
description: API version of the referent. | ||
type: string | ||
fieldPath: | ||
description: 'If referring to a piece of an object instead of an entire | ||
object, this string should contain a valid JSON/Go field access | ||
statement, such as desiredState.manifest.containers[2]. For example, | ||
if the object reference is to a container within a pod, this would | ||
take on a value like: "spec.containers{name}" (where "name" refers | ||
to the name of the container that triggered the event) or if no | ||
container name is specified "spec.containers[2]" (container with | ||
index 2 in this pod). This syntax is chosen only to have some well-defined | ||
way of referencing a part of an object. TODO: this design is not | ||
final and this field is subject to change in the future.' | ||
type: string | ||
kind: | ||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
name: | ||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' | ||
type: string | ||
namespace: | ||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' | ||
type: string | ||
resourceVersion: | ||
description: 'Specific resourceVersion to which this reference is | ||
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' | ||
type: string | ||
uid: | ||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
user: | ||
description: User is a reference to a user | ||
properties: | ||
apiVersion: | ||
description: API version of the referent. | ||
type: string | ||
fieldPath: | ||
description: 'If referring to a piece of an object instead of an entire | ||
object, this string should contain a valid JSON/Go field access | ||
statement, such as desiredState.manifest.containers[2]. For example, | ||
if the object reference is to a container within a pod, this would | ||
take on a value like: "spec.containers{name}" (where "name" refers | ||
to the name of the container that triggered the event) or if no | ||
container name is specified "spec.containers[2]" (container with | ||
index 2 in this pod). This syntax is chosen only to have some well-defined | ||
way of referencing a part of an object. TODO: this design is not | ||
final and this field is subject to change in the future.' | ||
type: string | ||
kind: | ||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
name: | ||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' | ||
type: string | ||
namespace: | ||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' | ||
type: string | ||
resourceVersion: | ||
description: 'Specific resourceVersion to which this reference is | ||
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' | ||
type: string | ||
uid: | ||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
type: object | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: users.user.openshift.io | ||
spec: | ||
group: user.openshift.io | ||
names: | ||
kind: User | ||
listKind: UserList | ||
plural: users | ||
singular: user | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: "Upon log in, every user of the system receives a User and Identity | ||
resource. Administrators may directly manipulate the attributes of the users | ||
for their own tracking, or set groups via the API. The user name is unique | ||
and is chosen based on the value provided by the identity provider - if | ||
a user already exists with the incoming name, the user name may have a number | ||
appended to it depending on the configuration of the system. \n Compatibility | ||
level 1: Stable within a major release for a minimum of 12 months or 3 minor | ||
releases (whichever is longer)." | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
fullName: | ||
description: FullName is the full name of user | ||
type: string | ||
groups: | ||
description: Groups specifies group names this user is a member of. This | ||
field is deprecated and will be removed in a future release. Instead, | ||
create a Group object containing the name of this User. | ||
items: | ||
type: string | ||
type: array | ||
identities: | ||
description: Identities are the identities associated with this user | ||
items: | ||
type: string | ||
type: array | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
required: | ||
- groups | ||
type: object | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, otherwise the test will fail as the code for creating NetworkPolicy is commented out.
PIt
- marks test case as Pending in the execution report. You can alsoXIt
- exclude it, andFIt
- focus test suite to run only tests withF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping that the comment one line above makes it clear :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice ! new things learnt every day