-
Notifications
You must be signed in to change notification settings - Fork 324
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 sameness group CRD #2048
Merged
Merged
add sameness group CRD #2048
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
da9c720
draft of adding sameness group CRD
b43ab8c
move sameness group tests to ent test file
d9b0540
update tests
b3db292
fix lint issues
32da2a9
generate yaml and update helm charts
97d0f2c
update field descriptions and validation and its test
3d21c89
remove unwanted files, add license comments back
0b295d0
rename samenessgroups to samenessgroup
0b62dd2
fix resource names
b02c688
update failing unit test
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
{{- if .Values.connectInject.enabled }} | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.8.0 | ||
creationTimestamp: null | ||
name: samenessgroups.consul.hashicorp.com | ||
labels: | ||
app: {{ template "consul.name" . }} | ||
chart: {{ template "consul.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
component: crd | ||
spec: | ||
group: consul.hashicorp.com | ||
names: | ||
kind: SamenessGroup | ||
listKind: SamenessGroupList | ||
plural: samenessgroups | ||
shortNames: | ||
- sameness-group | ||
singular: samenessgroup | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: The sync status of the resource with Consul | ||
jsonPath: .status.conditions[?(@.type=="Synced")].status | ||
name: Synced | ||
type: string | ||
- description: The last successful synced time of the resource with Consul | ||
jsonPath: .status.lastSyncedTime | ||
name: Last Synced | ||
type: date | ||
- description: The age of the resource | ||
jsonPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: SamenessGroup is the Schema for the samenessgroups API | ||
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 | ||
spec: | ||
description: SamenessGroupSpec defines the desired state of SamenessGroup. | ||
properties: | ||
defaultForFailover: | ||
description: 'DefaultForFailover indicates that upstream requests to members of the given sameness group will implicitly failover between members of this sameness group.' | ||
type: boolean | ||
includeLocal: | ||
description: 'IncludeLocal is used to include the local partition as the first member of the sameness group.' | ||
type: boolean | ||
members: | ||
description: 'Members are the partitions and peers that are part of the sameness group.' | ||
items: | ||
properties: | ||
partition: | ||
type: string | ||
peer: | ||
type: string | ||
type: object | ||
type: array | ||
type: object | ||
status: | ||
properties: | ||
conditions: | ||
description: Conditions indicate the latest available observations | ||
of a resource's current state. | ||
items: | ||
description: 'Conditions define a readiness condition for a Consul | ||
resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties' | ||
properties: | ||
lastTransitionTime: | ||
description: LastTransitionTime is the last time the condition | ||
transitioned from one status to another. | ||
format: date-time | ||
type: string | ||
message: | ||
description: A human readable message indicating details about | ||
the transition. | ||
type: string | ||
reason: | ||
description: The reason for the condition's last transition. | ||
type: string | ||
status: | ||
description: Status of the condition, one of True, False, Unknown. | ||
type: string | ||
type: | ||
description: Type of condition. | ||
type: string | ||
required: | ||
- status | ||
- type | ||
type: object | ||
type: array | ||
lastSyncedTime: | ||
description: LastSyncedTime is the last time the resource successfully | ||
synced with Consul. | ||
format: date-time | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] | ||
{{- end }} |
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
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.
Should we add a description back to this field too? I think it'll just require bringing the comment back on the proxydefaults_types file.
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.
Thanks, added them back, don't know why the gen tool removed it.