forked from k-orc/openstack-resource-controller
-
Notifications
You must be signed in to change notification settings - Fork 1
[AISOS-1914] [ORC] Add openstack designate DNSZone support to openstack-resource-controller #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
b8507f2
[AISOS-1922] Scaffold DNSZone Controller and API Boilerplate
87ffa3b
[AISOS-1923] Implement DNSZone API Spec and Status Type Definitions
3893815
[AISOS-1924] Implement DNSZone API Validation and Immutability Rules
82f7db7
[AISOS-1925] Implement DNSZone API Validation Tests
3e14eb2
[AISOS-1926] Implement OpenStack Designate DNS Client in osclients an…
7cf349c
[AISOS-1927] Implement DNSZone Controller Actuator for PRIMARY Zones …
67329b7
[AISOS-1928] Implement DNSZone Status Writer and Condition Reconcilia…
1ce4218
[AISOS-1929] Wire DNSZone Controller to Controller-Runtime Manager
d329174
[AISOS-1930] Implement Unit Tests for DNSZone Actuator and Status Writer
cb7efdd
[AISOS-1931] Configure Designate service in GitHub Actions E2E workflow
a771864
[AISOS-1932] Implement DNSZone KUTTL E2E Tests for Primary Zone Lifec…
f0f95ea
[AISOS-1933] Implement DNSZone KUTTL E2E Tests for Import and Error S…
c2bb87f
[AISOS-1934] Add DNSZone Manifest Examples and Update KUTTL Suite Set…
33d89a8
[AISOS-1935] Write DNSZone User Guide and Regenerate Website CRD Refe…
c104cb9
[AISOS-1914-review] Fix breaking issues and update conflict handling …
38007cb
[AISOS-1914-review] Fix DNSZone CRD and controller issues and resolve…
035ca06
[AISOS-1914-docs] Update stale DNSZone user guide documentation
ed8bed3
[AISOS-1914-ci-fix] Apply CI fix plan for DNSZone controller and bund…
e26bb70
[AISOS-1914-review-ci-fix-1] Add API validation test for PRIMARY zone…
689521b
[AISOS-1914-ci-fix] Apply CI fix plan for DNSZone KUTTL tests
a62957c
[AISOS-1914-ci-fix] Update DNSZone E2E KUTTL tests to use multi-label…
7a0669a
[AISOS-1914-review-ci-fix-3] Add getDNSZoneName fallback helper to gu…
5ccb53d
[AISOS-1914-ci-fix] Apply CI fix plan (attempt 4)
c87b1c2
[AISOS-1914] review: address PR feedback
e9ab88c
[AISOS-1914] review: address PR feedback
56b92b8
[AISOS-1914-review-review-impl] Add TestHandleMastersUpdate unit test…
23d7882
[AISOS-1914-review-fix] Update stale DNSZone type comment in examples
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 hidden or 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 hidden or 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 hidden or 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,155 @@ | ||
| /* | ||
| Copyright The ORC 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 v1alpha1 | ||
|
|
||
| import ( | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| ) | ||
|
|
||
| // +kubebuilder:validation:Enum:=PRIMARY;SECONDARY | ||
| type DNSZoneType string | ||
|
|
||
| const ( | ||
| DNSZoneTypePrimary DNSZoneType = "PRIMARY" | ||
| DNSZoneTypeSecondary DNSZoneType = "SECONDARY" | ||
| ) | ||
|
|
||
| // DNSZoneResourceSpec contains the desired state of the resource. | ||
| // +kubebuilder:validation:XValidation:rule="self.type == 'PRIMARY' ? (has(self.email) && self.email != \"\") : true",message="email is required for PRIMARY zones" | ||
| // +kubebuilder:validation:XValidation:rule="self.type == 'SECONDARY' ? (has(self.masters) && self.masters.size() > 0) : true",message="masters: required when type is SECONDARY" | ||
| // +kubebuilder:validation:XValidation:rule="self.type == 'PRIMARY' ? !has(self.masters) : true",message="masters: must not be specified when type is PRIMARY" | ||
| // +kubebuilder:validation:XValidation:rule="self.type == 'SECONDARY' ? !has(self.email) : true",message="email: must not be specified when type is SECONDARY" | ||
| type DNSZoneResourceSpec struct { | ||
| // name will be the name of the created resource. If not specified, the | ||
| // name of the ORC object will be used. | ||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable" | ||
| // +kubebuilder:validation:XValidation:rule="self.endsWith('.')",message="zone name must end with a period" | ||
| // +optional | ||
| Name *OpenStackName `json:"name,omitempty"` | ||
|
|
||
| // email is the email address of the administrator for the zone. | ||
| // +kubebuilder:validation:Format:=email | ||
| // +kubebuilder:validation:MaxLength:=255 | ||
| // +optional | ||
| Email *string `json:"email,omitempty"` | ||
|
|
||
| // description is a human-readable description for the resource. | ||
| // +kubebuilder:validation:MinLength:=1 | ||
| // +kubebuilder:validation:MaxLength:=255 | ||
| // +optional | ||
| Description *string `json:"description,omitempty"` | ||
|
|
||
| // ttl is the Time To Live for the zone in seconds. | ||
| // +kubebuilder:validation:Minimum:=1 | ||
| // +kubebuilder:validation:Maximum:=2147483647 | ||
| // +optional | ||
| TTL *int32 `json:"ttl,omitempty"` | ||
|
|
||
| // type is the type of the zone. | ||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="type is immutable" | ||
| // +kubebuilder:default:="PRIMARY" | ||
| // +optional | ||
| Type DNSZoneType `json:"type,omitempty"` | ||
|
|
||
| // masters specifies zone masters if this is a secondary zone. | ||
| // +kubebuilder:validation:MaxItems:=32 | ||
| // +kubebuilder:validation:items:MaxLength:=255 | ||
| // +listType=atomic | ||
| // +optional | ||
| Masters []string `json:"masters,omitempty"` | ||
| } | ||
|
|
||
| // DNSZoneFilter defines an existing resource by its properties | ||
| // +kubebuilder:validation:MinProperties:=1 | ||
| type DNSZoneFilter struct { | ||
| // name of the existing resource | ||
| // +kubebuilder:validation:XValidation:rule="self.endsWith('.')",message="name must end with a period" | ||
| // +optional | ||
| Name *OpenStackName `json:"name,omitempty"` | ||
|
|
||
| // email of the existing resource | ||
| // +kubebuilder:validation:Format:=email | ||
| // +kubebuilder:validation:MaxLength:=255 | ||
| // +optional | ||
| Email *string `json:"email,omitempty"` | ||
|
|
||
| // description of the existing resource | ||
| // +kubebuilder:validation:MinLength:=1 | ||
| // +kubebuilder:validation:MaxLength:=255 | ||
| // +optional | ||
| Description *string `json:"description,omitempty"` | ||
|
|
||
| // ttl of the existing resource | ||
| // +kubebuilder:validation:Minimum:=1 | ||
| // +kubebuilder:validation:Maximum:=2147483647 | ||
| // +optional | ||
| TTL *int32 `json:"ttl,omitempty"` | ||
|
|
||
| // type of the existing resource | ||
| // +optional | ||
| Type *DNSZoneType `json:"type,omitempty"` | ||
|
|
||
| // masters of the existing resource | ||
| // +kubebuilder:validation:MaxItems:=32 | ||
| // +kubebuilder:validation:items:MaxLength:=255 | ||
| // +listType=atomic | ||
| // +optional | ||
| Masters []string `json:"masters,omitempty"` | ||
| } | ||
|
|
||
| // DNSZoneResourceStatus represents the observed state of the resource. | ||
| type DNSZoneResourceStatus struct { | ||
| // name is a Human-readable name for the resource. Might not be unique. | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| Name string `json:"name,omitempty"` | ||
|
|
||
| // email is the email contact of the zone. | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| Email string `json:"email,omitempty"` | ||
|
|
||
| // description is a human-readable description for the resource. | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| Description string `json:"description,omitempty"` | ||
|
|
||
| // ttl is the Time to Live for the zone in seconds. | ||
| // +optional | ||
| TTL *int32 `json:"ttl,omitempty"` | ||
|
|
||
| // type is the type of the zone. | ||
| // +kubebuilder:validation:MaxLength=255 | ||
| // +optional | ||
| Type string `json:"type,omitempty"` | ||
|
|
||
| // masters specifies zone masters if this is a secondary zone. | ||
| // +kubebuilder:validation:MaxItems:=32 | ||
| // +kubebuilder:validation:items:MaxLength:=255 | ||
| // +listType=atomic | ||
| // +optional | ||
| Masters []string `json:"masters,omitempty"` | ||
|
|
||
| // transferredAt is the last time an update was retrieved from the master servers. | ||
| // +optional | ||
| TransferredAt *metav1.Time `json:"transferredAt,omitempty"` | ||
|
|
||
| // status is the status of the resource. | ||
| // +kubebuilder:validation:MaxLength=255 | ||
| // +optional | ||
| Status string `json:"status,omitempty"` | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.