Skip to content
Merged
Show file tree
Hide file tree
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
Jun 24, 2026
87ffa3b
[AISOS-1923] Implement DNSZone API Spec and Status Type Definitions
Jun 24, 2026
3893815
[AISOS-1924] Implement DNSZone API Validation and Immutability Rules
Jun 24, 2026
82f7db7
[AISOS-1925] Implement DNSZone API Validation Tests
Jun 24, 2026
3e14eb2
[AISOS-1926] Implement OpenStack Designate DNS Client in osclients an…
Jun 24, 2026
7cf349c
[AISOS-1927] Implement DNSZone Controller Actuator for PRIMARY Zones …
Jun 24, 2026
67329b7
[AISOS-1928] Implement DNSZone Status Writer and Condition Reconcilia…
Jun 24, 2026
1ce4218
[AISOS-1929] Wire DNSZone Controller to Controller-Runtime Manager
Jun 24, 2026
d329174
[AISOS-1930] Implement Unit Tests for DNSZone Actuator and Status Writer
Jun 24, 2026
cb7efdd
[AISOS-1931] Configure Designate service in GitHub Actions E2E workflow
Jun 24, 2026
a771864
[AISOS-1932] Implement DNSZone KUTTL E2E Tests for Primary Zone Lifec…
Jun 24, 2026
f0f95ea
[AISOS-1933] Implement DNSZone KUTTL E2E Tests for Import and Error S…
Jun 24, 2026
c2bb87f
[AISOS-1934] Add DNSZone Manifest Examples and Update KUTTL Suite Set…
Jun 24, 2026
33d89a8
[AISOS-1935] Write DNSZone User Guide and Regenerate Website CRD Refe…
Jun 24, 2026
c104cb9
[AISOS-1914-review] Fix breaking issues and update conflict handling …
Jun 24, 2026
38007cb
[AISOS-1914-review] Fix DNSZone CRD and controller issues and resolve…
Jun 24, 2026
035ca06
[AISOS-1914-docs] Update stale DNSZone user guide documentation
Jun 24, 2026
ed8bed3
[AISOS-1914-ci-fix] Apply CI fix plan for DNSZone controller and bund…
Jun 24, 2026
e26bb70
[AISOS-1914-review-ci-fix-1] Add API validation test for PRIMARY zone…
Jun 24, 2026
689521b
[AISOS-1914-ci-fix] Apply CI fix plan for DNSZone KUTTL tests
Jun 24, 2026
a62957c
[AISOS-1914-ci-fix] Update DNSZone E2E KUTTL tests to use multi-label…
Jun 24, 2026
7a0669a
[AISOS-1914-review-ci-fix-3] Add getDNSZoneName fallback helper to gu…
Jun 24, 2026
5ccb53d
[AISOS-1914-ci-fix] Apply CI fix plan (attempt 4)
Jun 24, 2026
c87b1c2
[AISOS-1914] review: address PR feedback
Jun 25, 2026
e9ab88c
[AISOS-1914] review: address PR feedback
Jun 25, 2026
56b92b8
[AISOS-1914-review-review-impl] Add TestHandleMastersUpdate unit test…
Jun 25, 2026
23d7882
[AISOS-1914-review-fix] Update stale DNSZone type comment in examples
Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,18 @@ jobs:
conf_overrides: |
enable_plugin neutron https://github.com/openstack/neutron ${{ matrix.openstack_version }}
enable_plugin manila https://github.com/openstack/manila ${{ matrix.openstack_version }}
enable_plugin designate https://github.com/openstack/designate ${{ matrix.openstack_version }}

[[post-config|/etc/nova/nova.conf]]
[filter_scheduler]
enabled_filters = ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter,SimpleCIDRAffinityFilter,JsonFilter

- name: Verify Designate CLI
run: |
openstack zone list
env:
OS_CLOUD: devstack

- name: Deploy a Kind Cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # tag=v1.14.0
with:
Expand Down
8 changes: 8 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ resources:
kind: ApplicationCredential
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
domain: k-orc.cloud
group: openstack
kind: DNSZone
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
Expand Down
155 changes: 155 additions & 0 deletions api/v1alpha1/dnszone_types.go
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"
Comment thread
eshulman2 marked this conversation as resolved.
// +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"`
}
Loading
Loading