mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-03-15 05:42:13 +08:00
Allow controlled customizations to internal resources
This commit is contained in:
@@ -69,6 +69,15 @@ type AutoscalingListenerSpec struct {
|
||||
|
||||
// +optional
|
||||
Template *corev1.PodTemplateSpec `json:"template,omitempty"`
|
||||
|
||||
// +optional
|
||||
ServiceAccountMetadata *ResourceMeta `json:"service_account_metadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
RoleMetadata *ResourceMeta `json:"role_metadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
RoleBindingMetadata *ResourceMeta `json:"role_binding_metadata,omitempty"`
|
||||
}
|
||||
|
||||
// AutoscalingListenerStatus defines the observed state of AutoscalingListener
|
||||
|
||||
@@ -84,6 +84,15 @@ type AutoscalingRunnerSetSpec struct {
|
||||
// +optional
|
||||
ListenerTemplate *corev1.PodTemplateSpec `json:"listenerTemplate,omitempty"`
|
||||
|
||||
// +optional
|
||||
ListenerServiceAccountMetadata *ResourceMeta `json:"listener_service_account_metadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
ListenerRoleMetadata *ResourceMeta `json:"listener_role_metadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
ListenerRoleBindingMetadata *ResourceMeta `json:"listener_role_binding_metadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
// +kubebuilder:validation:Minimum:=0
|
||||
MaxRunners *int `json:"maxRunners,omitempty"`
|
||||
|
||||
7
apis/actions.github.com/v1alpha1/common.go
Normal file
7
apis/actions.github.com/v1alpha1/common.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package v1alpha1
|
||||
|
||||
// ResourceMeta carries metadata common to all internal resources
|
||||
type ResourceMeta struct {
|
||||
Labels map[string]string `json:"labels"`
|
||||
Annotations map[string]string `json:"annotations"`
|
||||
}
|
||||
@@ -118,6 +118,21 @@ func (in *AutoscalingListenerSpec) DeepCopyInto(out *AutoscalingListenerSpec) {
|
||||
*out = new(v1.PodTemplateSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ServiceAccountMetadata != nil {
|
||||
in, out := &in.ServiceAccountMetadata, &out.ServiceAccountMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.RoleMetadata != nil {
|
||||
in, out := &in.RoleMetadata, &out.RoleMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.RoleBindingMetadata != nil {
|
||||
in, out := &in.RoleBindingMetadata, &out.RoleBindingMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingListenerSpec.
|
||||
@@ -233,6 +248,21 @@ func (in *AutoscalingRunnerSetSpec) DeepCopyInto(out *AutoscalingRunnerSetSpec)
|
||||
*out = new(v1.PodTemplateSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ListenerServiceAccountMetadata != nil {
|
||||
in, out := &in.ListenerServiceAccountMetadata, &out.ListenerServiceAccountMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ListenerRoleMetadata != nil {
|
||||
in, out := &in.ListenerRoleMetadata, &out.ListenerRoleMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ListenerRoleBindingMetadata != nil {
|
||||
in, out := &in.ListenerRoleBindingMetadata, &out.ListenerRoleBindingMetadata
|
||||
*out = new(ResourceMeta)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.MaxRunners != nil {
|
||||
in, out := &in.MaxRunners, &out.MaxRunners
|
||||
*out = new(int)
|
||||
@@ -660,6 +690,35 @@ func (in *ProxyServerConfig) DeepCopy() *ProxyServerConfig {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceMeta) DeepCopyInto(out *ResourceMeta) {
|
||||
*out = *in
|
||||
if in.Labels != nil {
|
||||
in, out := &in.Labels, &out.Labels
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMeta.
|
||||
func (in *ResourceMeta) DeepCopy() *ResourceMeta {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceMeta)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TLSCertificateSource) DeepCopyInto(out *TLSCertificateSource) {
|
||||
*out = *in
|
||||
|
||||
Reference in New Issue
Block a user