Tag fields with optional allowing patches without issues (#4528)
This commit is contained in:
parent
68c0a86188
commit
2fa72b510f
|
|
@ -24,36 +24,36 @@ import (
|
|||
|
||||
// AutoscalingListenerSpec defines the desired state of AutoscalingListener
|
||||
type AutoscalingListenerSpec struct {
|
||||
// Required
|
||||
// +optional
|
||||
GitHubConfigURL string `json:"githubConfigUrl,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
RunnerScaleSetID int `json:"runnerScaleSetId,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
AutoscalingRunnerSetNamespace string `json:"autoscalingRunnerSetNamespace,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
AutoscalingRunnerSetName string `json:"autoscalingRunnerSetName,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
EphemeralRunnerSetName string `json:"ephemeralRunnerSetName,omitempty"`
|
||||
|
||||
// Required
|
||||
// +kubebuilder:validation:Minimum:=0
|
||||
// +optional
|
||||
MaxRunners int `json:"maxRunners,omitempty"`
|
||||
|
||||
// Required
|
||||
// +kubebuilder:validation:Minimum:=0
|
||||
// +optional
|
||||
MinRunners int `json:"minRunners,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
Image string `json:"image,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
|
||||
|
||||
// +optional
|
||||
|
|
@ -99,10 +99,13 @@ type AutoscalingListenerStatus struct{}
|
|||
|
||||
// AutoscalingListener is the Schema for the autoscalinglisteners API
|
||||
type AutoscalingListener struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec AutoscalingListenerSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Spec AutoscalingListenerSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Status AutoscalingListenerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -110,6 +113,7 @@ type AutoscalingListener struct {
|
|||
// AutoscalingListenerList contains a list of AutoscalingListener
|
||||
type AutoscalingListenerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []AutoscalingListener `json:"items"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,19 +45,22 @@ import (
|
|||
|
||||
// AutoscalingRunnerSet is the Schema for the autoscalingrunnersets API
|
||||
type AutoscalingRunnerSet struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec AutoscalingRunnerSetSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Spec AutoscalingRunnerSetSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Status AutoscalingRunnerSetStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AutoscalingRunnerSetSpec defines the desired state of AutoscalingRunnerSet
|
||||
type AutoscalingRunnerSetSpec struct {
|
||||
// Required
|
||||
// +optional
|
||||
GitHubConfigUrl string `json:"githubConfigUrl,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`
|
||||
|
||||
// +optional
|
||||
|
|
@ -78,7 +81,7 @@ type AutoscalingRunnerSetSpec struct {
|
|||
// +optional
|
||||
VaultConfig *VaultConfig `json:"vaultConfig,omitempty"`
|
||||
|
||||
// Required
|
||||
// +optional
|
||||
Template corev1.PodTemplateSpec `json:"template,omitempty"`
|
||||
|
||||
// +optional
|
||||
|
|
|
|||
|
|
@ -41,10 +41,13 @@ const EphemeralRunnerContainerName = "runner"
|
|||
|
||||
// EphemeralRunner is the Schema for the ephemeralrunners API
|
||||
type EphemeralRunner struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EphemeralRunnerSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Spec EphemeralRunnerSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Status EphemeralRunnerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -102,16 +105,16 @@ func (er *EphemeralRunner) VaultProxy() *ProxyConfig {
|
|||
|
||||
// EphemeralRunnerSpec defines the desired state of EphemeralRunner
|
||||
type EphemeralRunnerSpec struct {
|
||||
// +required
|
||||
// +optional
|
||||
GitHubConfigURL string `json:"githubConfigUrl,omitempty"`
|
||||
|
||||
// +required
|
||||
// +optional
|
||||
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`
|
||||
|
||||
// +optional
|
||||
GitHubServerTLS *TLSConfig `json:"githubServerTLS,omitempty"`
|
||||
|
||||
// +required
|
||||
// +optional
|
||||
RunnerScaleSetID int `json:"runnerScaleSetId,omitempty"`
|
||||
|
||||
// +optional
|
||||
|
|
@ -126,6 +129,7 @@ type EphemeralRunnerSpec struct {
|
|||
// +optional
|
||||
EphemeralRunnerConfigSecretMetadata *ResourceMeta `json:"ephemeralRunnerConfigSecretMetadata,omitempty"`
|
||||
|
||||
// +optional
|
||||
corev1.PodTemplateSpec `json:",inline"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,13 @@ import (
|
|||
// EphemeralRunnerSetSpec defines the desired state of EphemeralRunnerSet
|
||||
type EphemeralRunnerSetSpec struct {
|
||||
// Replicas is the number of desired EphemeralRunner resources in the k8s namespace.
|
||||
// +optional
|
||||
Replicas int `json:"replicas,omitempty"`
|
||||
// PatchID is the unique identifier for the patch issued by the listener app
|
||||
// +optional
|
||||
PatchID int `json:"patchID"`
|
||||
// EphemeralRunnerSpec is the spec of the ephemeral runner
|
||||
// +optional
|
||||
EphemeralRunnerSpec EphemeralRunnerSpec `json:"ephemeralRunnerSpec,omitempty"`
|
||||
// EphemeralRunnerMetadata is the metadata to be applied to all ephemeral runners created by this set.
|
||||
// If the EphemeralRunnerMetadata is updated, the update applies to new ephemeral runners created after the update,
|
||||
|
|
@ -38,6 +41,7 @@ type EphemeralRunnerSetSpec struct {
|
|||
// EphemeralRunnerSetStatus defines the observed state of EphemeralRunnerSet
|
||||
type EphemeralRunnerSetStatus struct {
|
||||
// CurrentReplicas is the number of currently running EphemeralRunner resources being managed by this EphemeralRunnerSet.
|
||||
// +optional
|
||||
CurrentReplicas int `json:"currentReplicas"`
|
||||
// +optional
|
||||
PendingEphemeralRunners int `json:"pendingEphemeralRunners"`
|
||||
|
|
@ -71,10 +75,13 @@ const (
|
|||
|
||||
// EphemeralRunnerSet is the Schema for the ephemeralrunnersets API
|
||||
type EphemeralRunnerSet struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EphemeralRunnerSetSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Spec EphemeralRunnerSetSpec `json:"spec,omitempty"`
|
||||
// +optional
|
||||
Status EphemeralRunnerSetStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,8 @@ spec:
|
|||
description: AutoscalingListenerSpec defines the desired state of AutoscalingListener
|
||||
properties:
|
||||
autoscalingRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
autoscalingRunnerSetNamespace:
|
||||
description: Required
|
||||
type: string
|
||||
configSecretMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
@ -70,13 +68,10 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
ephemeralRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -109,10 +104,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
image:
|
||||
description: Required
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
description: Required
|
||||
items:
|
||||
description: |-
|
||||
LocalObjectReference contains enough information to let you locate the
|
||||
|
|
@ -131,7 +124,6 @@ spec:
|
|||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
maxRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
metrics:
|
||||
|
|
@ -183,7 +175,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
minRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
proxy:
|
||||
|
|
@ -236,7 +227,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
runnerScaleSetId:
|
||||
description: Required
|
||||
type: integer
|
||||
serviceAccountMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
|
|||
|
|
@ -113,10 +113,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -8391,7 +8389,7 @@ spec:
|
|||
runnerScaleSetName:
|
||||
type: string
|
||||
template:
|
||||
description: Required
|
||||
description: PodTemplateSpec describes the data a pod should have when created from a template
|
||||
properties:
|
||||
metadata:
|
||||
description: |-
|
||||
|
|
|
|||
|
|
@ -8290,10 +8290,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerStatus defines the observed state of EphemeralRunner
|
||||
|
|
|
|||
|
|
@ -8299,10 +8299,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
patchID:
|
||||
description: PatchID is the unique identifier for the patch issued by the listener app
|
||||
|
|
@ -8310,8 +8306,6 @@ spec:
|
|||
replicas:
|
||||
description: Replicas is the number of desired EphemeralRunner resources in the k8s namespace.
|
||||
type: integer
|
||||
required:
|
||||
- patchID
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerSetStatus defines the observed state of EphemeralRunnerSet
|
||||
|
|
@ -8328,8 +8322,6 @@ spec:
|
|||
type: string
|
||||
runningEphemeralRunners:
|
||||
type: integer
|
||||
required:
|
||||
- currentReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
|
|
|||
|
|
@ -51,10 +51,8 @@ spec:
|
|||
description: AutoscalingListenerSpec defines the desired state of AutoscalingListener
|
||||
properties:
|
||||
autoscalingRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
autoscalingRunnerSetNamespace:
|
||||
description: Required
|
||||
type: string
|
||||
configSecretMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
@ -70,13 +68,10 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
ephemeralRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -109,10 +104,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
image:
|
||||
description: Required
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
description: Required
|
||||
items:
|
||||
description: |-
|
||||
LocalObjectReference contains enough information to let you locate the
|
||||
|
|
@ -131,7 +124,6 @@ spec:
|
|||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
maxRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
metrics:
|
||||
|
|
@ -183,7 +175,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
minRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
proxy:
|
||||
|
|
@ -236,7 +227,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
runnerScaleSetId:
|
||||
description: Required
|
||||
type: integer
|
||||
serviceAccountMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
|
|||
|
|
@ -113,10 +113,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -8391,7 +8389,7 @@ spec:
|
|||
runnerScaleSetName:
|
||||
type: string
|
||||
template:
|
||||
description: Required
|
||||
description: PodTemplateSpec describes the data a pod should have when created from a template
|
||||
properties:
|
||||
metadata:
|
||||
description: |-
|
||||
|
|
|
|||
|
|
@ -8290,10 +8290,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerStatus defines the observed state of EphemeralRunner
|
||||
|
|
|
|||
|
|
@ -8299,10 +8299,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
patchID:
|
||||
description: PatchID is the unique identifier for the patch issued by the listener app
|
||||
|
|
@ -8310,8 +8306,6 @@ spec:
|
|||
replicas:
|
||||
description: Replicas is the number of desired EphemeralRunner resources in the k8s namespace.
|
||||
type: integer
|
||||
required:
|
||||
- patchID
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerSetStatus defines the observed state of EphemeralRunnerSet
|
||||
|
|
@ -8328,8 +8322,6 @@ spec:
|
|||
type: string
|
||||
runningEphemeralRunners:
|
||||
type: integer
|
||||
required:
|
||||
- currentReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
|
|
|||
|
|
@ -51,10 +51,8 @@ spec:
|
|||
description: AutoscalingListenerSpec defines the desired state of AutoscalingListener
|
||||
properties:
|
||||
autoscalingRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
autoscalingRunnerSetNamespace:
|
||||
description: Required
|
||||
type: string
|
||||
configSecretMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
@ -70,13 +68,10 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
ephemeralRunnerSetName:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -109,10 +104,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
image:
|
||||
description: Required
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
description: Required
|
||||
items:
|
||||
description: |-
|
||||
LocalObjectReference contains enough information to let you locate the
|
||||
|
|
@ -131,7 +124,6 @@ spec:
|
|||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
maxRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
metrics:
|
||||
|
|
@ -183,7 +175,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
minRunners:
|
||||
description: Required
|
||||
minimum: 0
|
||||
type: integer
|
||||
proxy:
|
||||
|
|
@ -236,7 +227,6 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
runnerScaleSetId:
|
||||
description: Required
|
||||
type: integer
|
||||
serviceAccountMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal
|
||||
|
|
|
|||
|
|
@ -113,10 +113,8 @@ spec:
|
|||
type: object
|
||||
type: object
|
||||
githubConfigSecret:
|
||||
description: Required
|
||||
type: string
|
||||
githubConfigUrl:
|
||||
description: Required
|
||||
type: string
|
||||
githubServerTLS:
|
||||
properties:
|
||||
|
|
@ -8391,7 +8389,7 @@ spec:
|
|||
runnerScaleSetName:
|
||||
type: string
|
||||
template:
|
||||
description: Required
|
||||
description: PodTemplateSpec describes the data a pod should have when created from a template
|
||||
properties:
|
||||
metadata:
|
||||
description: |-
|
||||
|
|
|
|||
|
|
@ -8290,10 +8290,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerStatus defines the observed state of EphemeralRunner
|
||||
|
|
|
|||
|
|
@ -8299,10 +8299,6 @@ spec:
|
|||
It is used to identify which vault integration should be used to resolve secrets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- githubConfigSecret
|
||||
- githubConfigUrl
|
||||
- runnerScaleSetId
|
||||
type: object
|
||||
patchID:
|
||||
description: PatchID is the unique identifier for the patch issued by the listener app
|
||||
|
|
@ -8310,8 +8306,6 @@ spec:
|
|||
replicas:
|
||||
description: Replicas is the number of desired EphemeralRunner resources in the k8s namespace.
|
||||
type: integer
|
||||
required:
|
||||
- patchID
|
||||
type: object
|
||||
status:
|
||||
description: EphemeralRunnerSetStatus defines the observed state of EphemeralRunnerSet
|
||||
|
|
@ -8328,8 +8322,6 @@ spec:
|
|||
type: string
|
||||
runningEphemeralRunners:
|
||||
type: integer
|
||||
required:
|
||||
- currentReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue