Skip to content

Commit

Permalink
Merge pull request #181 from openstack-k8s-operators/main
Browse files Browse the repository at this point in the history
Merge Network Attachments from Main Branch
  • Loading branch information
beagles authored Oct 2, 2023
2 parents f032aca + 4607973 commit 84df64c
Show file tree
Hide file tree
Showing 21 changed files with 376 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ make manifests

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)


## License

Copyright 2022.
Expand Down
17 changes: 17 additions & 0 deletions api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
name: NetworkAttachments
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
Expand Down Expand Up @@ -83,6 +87,12 @@ spec:
to add additional files. Those get added to the service config dir
in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment resource
names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -245,6 +255,13 @@ spec:
type: string
description: Map of hashes to track e.g. job status
type: object
networkAttachments:
additionalProperties:
items:
type: string
type: array
description: NetworkAttachment status of the deployment pods
type: object
readyCount:
description: ReadyCount of Octavia Amphora Controllers
format: int32
Expand Down
17 changes: 17 additions & 0 deletions api/bases/octavia.openstack.org_octaviaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
name: NetworkAttachments
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
Expand Down Expand Up @@ -91,6 +95,12 @@ spec:
to add additional files. Those get added to the service config dir
in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment resource
names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -422,6 +432,13 @@ spec:
type: string
description: Map of hashes to track e.g. job status
type: object
networkAttachments:
additionalProperties:
items:
type: string
type: array
description: NetworkAttachment status of the deployment pods
type: object
readyCount:
description: ReadyCount of octavia API instances
format: int32
Expand Down
24 changes: 24 additions & 0 deletions api/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ spec:
also be used to add additional files. Those get added to the
service config dir in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment
resource names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -470,6 +476,12 @@ spec:
also be used to add additional files. Those get added to the
service config dir in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment
resource names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -620,6 +632,12 @@ spec:
also be used to add additional files. Those get added to the
service config dir in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment
resource names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -770,6 +788,12 @@ spec:
also be used to add additional files. Those get added to the
service config dir in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment
resource names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down
10 changes: 9 additions & 1 deletion api/v1beta1/amphoracontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type OctaviaAmphoraControllerSpec struct {
// +kubebuilder:validation:Maximum=32
// +kubebuilder:validation:Minimum=0
// Replicas - Octavia Worker Replicas
Replicas int32 `json:"replicas"`
Replicas *int32 `json:"replicas"`

// +kubebuilder:validation:Required
// Secret containing OpenStack password information for octavia OctaviaDatabasePassword, AdminPassword
Expand Down Expand Up @@ -112,6 +112,10 @@ type OctaviaAmphoraControllerSpec struct {
// Resources - Compute Resources required by this service (Limits/Requests).
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Resources corev1.ResourceRequirements `json:"resources,omitempty"`

// +kubebuilder:validation:Optional
// NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network
NetworkAttachments []string `json:"networkAttachments,omitempty"`
}

// OctaviaAmphoraControllerStatus defines the observed state of the Octavia Amphora Controller
Expand All @@ -127,10 +131,14 @@ type OctaviaAmphoraControllerStatus struct {

// Octavia Database Hostname
DatabaseHostname string `json:"databaseHostname,omitempty"`

// NetworkAttachment status of the deployment pods
NetworkAttachments map[string][]string `json:"networkAttachments,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="NetworkAttachments",type="string",JSONPath=".status.spec.networkAttachments",description="NetworkAttachments"
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"

Expand Down
8 changes: 8 additions & 0 deletions api/v1beta1/octaviaapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ type OctaviaAPISpec struct {
// +kubebuilder:validation:Optional
// Override, provides the ability to override the generated manifest of several child resources.
Override APIOverrideSpec `json:"override,omitempty"`

// +kubebuilder:validation:Optional
// NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network
NetworkAttachments []string `json:"networkAttachments,omitempty"`
}

// APIOverrideSpec to override the generated manifest of several child resources.
Expand Down Expand Up @@ -153,10 +157,14 @@ type OctaviaAPIStatus struct {

// Octavia Database Hostname
DatabaseHostname string `json:"databaseHostname,omitempty"`

// NetworkAttachment status of the deployment pods
NetworkAttachments map[string][]string `json:"networkAttachments,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="NetworkAttachments",type="string",JSONPath=".status.spec.networkAttachments",description="NetworkAttachments"
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"

Expand Down
45 changes: 45 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
name: NetworkAttachments
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
Expand Down Expand Up @@ -83,6 +87,12 @@ spec:
to add additional files. Those get added to the service config dir
in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment resource
names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -245,6 +255,13 @@ spec:
type: string
description: Map of hashes to track e.g. job status
type: object
networkAttachments:
additionalProperties:
items:
type: string
type: array
description: NetworkAttachment status of the deployment pods
type: object
readyCount:
description: ReadyCount of Octavia Amphora Controllers
format: int32
Expand Down
17 changes: 17 additions & 0 deletions config/crd/bases/octavia.openstack.org_octaviaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
name: NetworkAttachments
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
Expand Down Expand Up @@ -91,6 +95,12 @@ spec:
to add additional files. Those get added to the service config dir
in /etc/<service> . TODO: -> implement'
type: object
networkAttachments:
description: NetworkAttachments is a list of NetworkAttachment resource
names to expose the services to the given network
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -422,6 +432,13 @@ spec:
type: string
description: Map of hashes to track e.g. job status
type: object
networkAttachments:
additionalProperties:
items:
type: string
type: array
description: NetworkAttachment status of the deployment pods
type: object
readyCount:
description: ReadyCount of octavia API instances
format: int32
Expand Down
Loading

0 comments on commit 84df64c

Please sign in to comment.