Skip to content

Commit bd9605e

Browse files
xekcursoragent
andcommitted
Application Credential support
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 89e4bc0 commit bd9605e

32 files changed

+833
-194
lines changed

api/bases/ironic.openstack.org_ironicapis.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ spec:
5757
description: APITimeout for HAProxy, Apache
5858
minimum: 10
5959
type: integer
60+
auth:
61+
description: Auth - Parameters related to authentication (inherited
62+
from parent Ironic CR)
63+
properties:
64+
applicationCredentialSecret:
65+
description: ApplicationCredentialSecret - Secret containing Application
66+
Credential ID and Secret
67+
type: string
68+
type: object
6069
containerImage:
6170
description: ContainerImage - Ironic API Container Image
6271
type: string

api/bases/ironic.openstack.org_ironicconductors.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ spec:
5252
spec:
5353
description: IronicConductorSpec defines the desired state of IronicConductor
5454
properties:
55+
auth:
56+
description: Auth - Parameters related to authentication (inherited
57+
from parent Ironic CR)
58+
properties:
59+
applicationCredentialSecret:
60+
description: ApplicationCredentialSecret - Secret containing Application
61+
Credential ID and Secret
62+
type: string
63+
type: object
5564
conductorGroup:
5665
description: ConductorGroup - Ironic Conductor conductor group.
5766
type: string

api/bases/ironic.openstack.org_ironicinspectors.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ spec:
5757
description: APITimeout for HAProxy, Apache
5858
minimum: 10
5959
type: integer
60+
auth:
61+
description: Auth - Parameters related to authentication
62+
properties:
63+
applicationCredentialSecret:
64+
description: ApplicationCredentialSecret - Secret containing Application
65+
Credential ID and Secret
66+
type: string
67+
type: object
6068
containerImage:
6169
description: ContainerImage - Ironic Inspector Container Image
6270
type: string

api/bases/ironic.openstack.org_ironicneutronagents.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ spec:
5454
description: IronicNeutronAgentSpec defines the desired state of ML2 baremetal
5555
- ironic-neutron-agent agents
5656
properties:
57+
auth:
58+
description: Auth - Parameters related to authentication (inherited
59+
from parent Ironic CR)
60+
properties:
61+
applicationCredentialSecret:
62+
description: ApplicationCredentialSecret - Secret containing Application
63+
Credential ID and Secret
64+
type: string
65+
type: object
5766
containerImage:
5867
description: ContainerImage - ML2 baremtal - Ironic Neutron Agent
5968
Image

api/bases/ironic.openstack.org_ironics.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ spec:
5353
description: APITimeout for HAProxy, Apache
5454
minimum: 10
5555
type: integer
56+
auth:
57+
description: Auth - Parameters related to authentication (shared by
58+
IronicAPI, IronicConductor, and IronicNeutronAgent)
59+
properties:
60+
applicationCredentialSecret:
61+
description: ApplicationCredentialSecret - Secret containing Application
62+
Credential ID and Secret
63+
type: string
64+
type: object
5665
customServiceConfig:
5766
default: '# add your customization here'
5867
description: |-
@@ -621,6 +630,14 @@ spec:
621630
description: IronicInspector - Spec definition for the inspector service
622631
of this Ironic deployment
623632
properties:
633+
auth:
634+
description: Auth - Parameters related to authentication
635+
properties:
636+
applicationCredentialSecret:
637+
description: ApplicationCredentialSecret - Secret containing
638+
Application Credential ID and Secret
639+
type: string
640+
type: object
624641
customServiceConfig:
625642
default: '# add your customization here'
626643
description: |-

api/v1beta1/common_types.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20-
corev1 "k8s.io/api/core/v1"
2120
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
21+
corev1 "k8s.io/api/core/v1"
2222
"k8s.io/apimachinery/pkg/util/validation/field"
2323
)
2424

@@ -78,6 +78,14 @@ type KeystoneEndpoints struct {
7878
Public string `json:"public"`
7979
}
8080

81+
// AuthSpec defines authentication parameters
82+
type AuthSpec struct {
83+
// +kubebuilder:validation:Optional
84+
// +operator-sdk:csv:customresourcedefinitions:type=spec
85+
// ApplicationCredentialSecret - Secret containing Application Credential ID and Secret
86+
ApplicationCredentialSecret string `json:"applicationCredentialSecret,omitempty"`
87+
}
88+
8189
// ValidateTopology -
8290
func (instance *IronicServiceTemplate) ValidateTopology(
8391
basePath *field.Path,

api/v1beta1/ironic_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ type IronicSpecCore struct {
143143
// require oslo.messaging transport when not in standalone mode.
144144
RPCTransport string `json:"rpcTransport"`
145145

146+
// +kubebuilder:validation:Optional
147+
// +operator-sdk:csv:customresourcedefinitions:type=spec
148+
// Auth - Parameters related to authentication (shared by IronicAPI, IronicConductor, and IronicNeutronAgent)
149+
Auth AuthSpec `json:"auth,omitempty"`
150+
146151
// +kubebuilder:validation:Optional
147152
// NodeSelector to target subset of worker nodes running this service. Setting
148153
// NodeSelector here acts as a default value and can be overridden by service

api/v1beta1/ironicapi_types.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ package v1beta1
1919
import (
2020
"fmt"
2121

22+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2223
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2324
"github.com/openstack-k8s-operators/lib-common/modules/common/endpoint"
2425
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
2526
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
26-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2828
)
2929

@@ -116,6 +116,11 @@ type IronicAPISpec struct {
116116
// +kubebuilder:validation:Minimum=10
117117
// APITimeout for HAProxy, Apache
118118
APITimeout int `json:"apiTimeout"`
119+
120+
// +kubebuilder:validation:Optional
121+
// +operator-sdk:csv:customresourcedefinitions:type=spec
122+
// Auth - Parameters related to authentication (inherited from parent Ironic CR)
123+
Auth AuthSpec `json:"auth,omitempty"`
119124
}
120125

121126
// IronicAPIStatus defines the observed state of IronicAPI

api/v1beta1/ironicconductor_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ type IronicConductorSpec struct {
149149
// +kubebuilder:validation:Optional
150150
// ConsoleImage - Ironic Graphical Console Container Image
151151
ConsoleImage string `json:"consoleImage"`
152+
153+
// +kubebuilder:validation:Optional
154+
// +operator-sdk:csv:customresourcedefinitions:type=spec
155+
// Auth - Parameters related to authentication (inherited from parent Ironic CR)
156+
Auth AuthSpec `json:"auth,omitempty"`
152157
}
153158

154159
// IronicConductorStatus defines the observed state of IronicConductor

api/v1beta1/ironicinspector_types.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20-
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2120
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
21+
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2222
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
2323
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2424
corev1 "k8s.io/api/core/v1"
@@ -114,6 +114,11 @@ type IronicInspectorTemplate struct {
114114
// TLS - Parameters related to the TLS
115115
TLS tls.API `json:"tls,omitempty"`
116116

117+
// +kubebuilder:validation:Optional
118+
// +operator-sdk:csv:customresourcedefinitions:type=spec
119+
// Auth - Parameters related to authentication
120+
Auth AuthSpec `json:"auth,omitempty"`
121+
117122
// +kubebuilder:validation:Optional
118123
// TopologyRef to apply the Topology defined by the associated CR referenced
119124
// by name

0 commit comments

Comments
 (0)