Update types

This commit is contained in:
superflo22 2025-04-11 16:00:27 +02:00
parent a428b29771
commit 9183d1f403
3 changed files with 31 additions and 54 deletions

View file

@ -1,41 +1,32 @@
/*
Copyright 2025.
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 package v1alpha1
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// TechnitiumAuthoritySpec defines the desired state of TechnitiumAuthority // TechnitiumAuthoritySpec defines the desired state of TechnitiumAuthority
type TechnitiumAuthoritySpec struct { type TechnitiumAuthoritySpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Zone string `json:"zone"`
// Important: Run "make" to regenerate code after modifying this file Primary AuthorityEndpoint `json:"primary"`
Secondaries []AuthorityEndpoint `json:"secondaries,omitempty"`
DNSAppConfig string `json:"dnsApp.config"`
}
// Foo is an example field of TechnitiumAuthority. Edit technitiumauthority_types.go to remove/update // AuthorityEndpoint defines the API endpoint and credentials
Foo string `json:"foo,omitempty"` type AuthorityEndpoint struct {
Endpoint string `json:"endpoint"`
APIKeySecretRef SecretKeySelector `json:"apiKeySecretRef"`
}
// SecretKeySelector defines the reference to a key inside a Kubernetes Secret
type SecretKeySelector struct {
Name string `json:"name"`
Key string `json:"key"`
} }
// TechnitiumAuthorityStatus defines the observed state of TechnitiumAuthority // TechnitiumAuthorityStatus defines the observed state of TechnitiumAuthority
type TechnitiumAuthorityStatus struct { type TechnitiumAuthorityStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Add any observed status fields here
// Important: Run "make" to regenerate code after modifying this file
} }
// +kubebuilder:object:root=true // +kubebuilder:object:root=true

View file

@ -1,41 +1,26 @@
/*
Copyright 2025.
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 package v1alpha1
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// TechnitiumRecordSpec defines the desired state of TechnitiumRecord // TechnitiumRecordSpec defines the desired state of TechnitiumRecord
type TechnitiumRecordSpec struct { type TechnitiumRecordSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster AuthorityRef AuthorityReference `json:"authorityRef"`
// Important: Run "make" to regenerate code after modifying this file Name string `json:"name"`
TTL int `json:"ttl"`
ClassPath string `json:"classPath"`
RecordData map[string][]string `json:"recordData,omitempty"`
}
// Foo is an example field of TechnitiumRecord. Edit technitiumrecord_types.go to remove/update // AuthorityReference references a TechnitiumAuthority
Foo string `json:"foo,omitempty"` type AuthorityReference struct {
Name string `json:"name"`
} }
// TechnitiumRecordStatus defines the observed state of TechnitiumRecord // TechnitiumRecordStatus defines the observed state of TechnitiumRecord
type TechnitiumRecordStatus struct { type TechnitiumRecordStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Define observed status fields here
// Important: Run "make" to regenerate code after modifying this file
} }
// +kubebuilder:object:root=true // +kubebuilder:object:root=true

View file

@ -14,7 +14,8 @@ spec:
classPath: SimpleAddress classPath: SimpleAddress
recordData: recordData:
public: # These are examples and might be renamed by the user
- 93.184.216.34 # public:
vpn: # - 93.184.216.34
- 10.0.0.99 # vpn:
# - 10.0.0.99