1818package v1alpha1
1919
2020import (
21- v1 "k8s.io/api/core/v1"
2221 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2322)
2423
@@ -36,51 +35,13 @@ type BackendConfigSpec struct {
3635 Env map [string ]string `json:"env,omitempty"`
3736
3837 // +kubebuilder:validation:Optional
39- Pod * BackendConfigPodPolicy `json:"pod,omitempty"`
38+ Pod * PodPolicy `json:"pod,omitempty"`
4039
4140 // +kubebuilder:validation:Optional
4241 // indicate whether auto update functions&sinks&source when the BackendConfig is updated
4342 AutoUpdate bool `json:"autoUpdate,omitempty"`
4443}
4544
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-
8445// BackendConfigStatus defines the observed state of BackendConfig
8546type BackendConfigStatus struct {
8647 // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
0 commit comments