18
18
package v1alpha1
19
19
20
20
import (
21
- v1 "k8s.io/api/core/v1"
22
21
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23
22
)
24
23
@@ -36,51 +35,13 @@ type BackendConfigSpec struct {
36
35
Env map [string ]string `json:"env,omitempty"`
37
36
38
37
// +kubebuilder:validation:Optional
39
- Pod * BackendConfigPodPolicy `json:"pod,omitempty"`
38
+ Pod * PodPolicy `json:"pod,omitempty"`
40
39
41
40
// +kubebuilder:validation:Optional
42
41
// indicate whether auto update functions&sinks&source when the BackendConfig is updated
43
42
AutoUpdate bool `json:"autoUpdate,omitempty"`
44
43
}
45
44
46
- // BackendConfigPodPolicy defines the policy for the pod
47
- type BackendConfigPodPolicy struct {
48
- // Labels specify the labels to attach to pod the operator creates for the cluster.
49
- Labels map [string ]string `json:"labels,omitempty"`
50
-
51
- // NodeSelector specifies a map of key-value pairs. For a pod to be eligible to run
52
- // on a node, the node must have each of the indicated key-value pairs as labels.
53
- NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
54
-
55
- // Affinity specifies the scheduling constraints of a pod
56
- Affinity * v1.Affinity `json:"affinity,omitempty"`
57
-
58
- // Tolerations specifies the tolerations of a Pod
59
- Tolerations []v1.Toleration `json:"tolerations,omitempty"`
60
-
61
- // Annotations specifies the annotations to attach to pods the operator creates
62
- Annotations map [string ]string `json:"annotations,omitempty"`
63
-
64
- // SecurityContext specifies the security context for the entire pod
65
- // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context
66
- SecurityContext * v1.PodSecurityContext `json:"securityContext,omitempty"`
67
-
68
- // TerminationGracePeriodSeconds is the amount of time that kubernetes will give
69
- // for a pod before terminating it.
70
- TerminationGracePeriodSeconds * int64 `json:"terminationGracePeriodSeconds,omitempty"`
71
-
72
- // ImagePullSecrets is an optional list of references to secrets in the same
73
- // namespace to use for pulling any of the images used by this PodSpec.
74
- ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
75
-
76
- // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
77
- // +optional
78
- ServiceAccountName string `json:"serviceAccountName,omitempty"`
79
-
80
- // +kubebuilder:validation:Optional
81
- Liveness * Liveness `json:"liveness,omitempty"`
82
- }
83
-
84
45
// BackendConfigStatus defines the observed state of BackendConfig
85
46
type BackendConfigStatus struct {
86
47
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
0 commit comments