|
| 1 | +package vendored |
| 2 | + |
| 3 | +import ( |
| 4 | + appsv1 "k8s.io/api/apps/v1" |
| 5 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 6 | + "k8s.io/api/apps/v1" |
| 7 | +) |
| 8 | + |
| 9 | +// ObjectMeta is metadata contains the configurable metadata fields for the |
| 10 | +// runtime objects. |
| 11 | +type ObjectMeta struct { |
| 12 | + // Name is the name of the object. |
| 13 | + // +optional |
| 14 | + Name *string `json:"name,omitempty"` |
| 15 | + // Annotations is an unstructured key value map stored with a resource that |
| 16 | + // may be set by external tools to store and retrieve arbitrary metadata. |
| 17 | + // They are not queryable and should be preserved when modifying objects. |
| 18 | + // More info: http:https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| 19 | + // +optional |
| 20 | + Annotations map[string]string `json:"annotations,omitempty"` |
| 21 | + |
| 22 | + // Map of string keys and values that can be used to organize and categorize |
| 23 | + // (scope and select) objects. Labels will be merged with internal labels |
| 24 | + // used by crossplane, and labels with a crossplane.io key might be |
| 25 | + // overwritten. |
| 26 | + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| 27 | + // +optional |
| 28 | + Labels map[string]string `json:"labels,omitempty"` |
| 29 | +} |
| 30 | + |
| 31 | +// DeploymentTemplate is the template for the Deployment object. |
| 32 | +type DeploymentTemplate struct { |
| 33 | + // Metadata contains the configurable metadata fields for the Deployment. |
| 34 | + // +optional |
| 35 | + Metadata *ObjectMeta `json:"metadata,omitempty"` |
| 36 | + |
| 37 | + // Spec contains the configurable spec fields for the Deployment object. |
| 38 | + // +optional |
| 39 | + Spec *appsv1.DeploymentSpec `json:"spec,omitempty"` |
| 40 | +} |
| 41 | + |
| 42 | +// ServiceTemplate is the template for the Service object. |
| 43 | +type ServiceTemplate struct { |
| 44 | + // Metadata contains the configurable metadata fields for the Service. |
| 45 | + // +optional |
| 46 | + Metadata *ObjectMeta `json:"metadata,omitempty"` |
| 47 | +} |
| 48 | + |
| 49 | +// ServiceAccountTemplate is the template for the ServiceAccount object. |
| 50 | +type ServiceAccountTemplate struct { |
| 51 | + // Metadata contains the configurable metadata fields for the ServiceAccount. |
| 52 | + // +optional |
| 53 | + Metadata *ObjectMeta `json:"metadata,omitempty"` |
| 54 | +} |
| 55 | + |
| 56 | +// DeploymentRuntimeConfigSpec specifies the configuration for a packaged controller. |
| 57 | +// Values provided will override package manager defaults. Labels and |
| 58 | +// annotations are passed to both the controller Deployment and ServiceAccount. |
| 59 | +type DeploymentRuntimeConfigSpec struct { |
| 60 | + // DeploymentTemplate is the template for the Deployment object. |
| 61 | + // +optional |
| 62 | + DeploymentTemplate *DeploymentTemplate `json:"deploymentTemplate,omitempty"` |
| 63 | + // ServiceTemplate is the template for the Service object. |
| 64 | + // +optional |
| 65 | + ServiceTemplate *ServiceTemplate `json:"serviceTemplate,omitempty"` |
| 66 | + // ServiceAccountTemplate is the template for the ServiceAccount object. |
| 67 | + // +optional |
| 68 | + ServiceAccountTemplate *ServiceAccountTemplate `json:"serviceAccountTemplate,omitempty"` |
| 69 | +} |
| 70 | + |
| 71 | +// The DeploymentRuntimeConfig provides settings for the Kubernetes Deployment |
| 72 | +// of a Provider or composition function package. |
| 73 | +// |
| 74 | +// Read the Crossplane documentation for |
| 75 | +// [more information about DeploymentRuntimeConfigs](https://docs.crossplane.io/latest/concepts/providers/#runtime-configuration). |
| 76 | +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" |
| 77 | +// +kubebuilder:resource:scope=Cluster,categories={crossplane} |
| 78 | +type DeploymentRuntimeConfig struct { |
| 79 | + metav1.TypeMeta `json:",inline"` |
| 80 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 81 | + |
| 82 | + Spec DeploymentRuntimeConfigSpec `json:"spec,omitempty"` |
| 83 | +} |
| 84 | + |
| 85 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 86 | +func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { |
| 87 | + *out = *in |
| 88 | + if in.Name != nil { |
| 89 | + in, out := &in.Name, &out.Name |
| 90 | + *out = new(string) |
| 91 | + **out = **in |
| 92 | + } |
| 93 | + if in.Annotations != nil { |
| 94 | + in, out := &in.Annotations, &out.Annotations |
| 95 | + *out = make(map[string]string, len(*in)) |
| 96 | + for key, val := range *in { |
| 97 | + (*out)[key] = val |
| 98 | + } |
| 99 | + } |
| 100 | + if in.Labels != nil { |
| 101 | + in, out := &in.Labels, &out.Labels |
| 102 | + *out = make(map[string]string, len(*in)) |
| 103 | + for key, val := range *in { |
| 104 | + (*out)[key] = val |
| 105 | + } |
| 106 | + } |
| 107 | +} |
| 108 | + |
| 109 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 110 | +func (in *DeploymentTemplate) DeepCopyInto(out *DeploymentTemplate) { |
| 111 | + *out = *in |
| 112 | + if in.Metadata != nil { |
| 113 | + in, out := &in.Metadata, &out.Metadata |
| 114 | + *out = new(ObjectMeta) |
| 115 | + (*in).DeepCopyInto(*out) |
| 116 | + } |
| 117 | + if in.Spec != nil { |
| 118 | + in, out := &in.Spec, &out.Spec |
| 119 | + *out = new(v1.DeploymentSpec) |
| 120 | + (*in).DeepCopyInto(*out) |
| 121 | + } |
| 122 | +} |
| 123 | + |
| 124 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 125 | +func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate) { |
| 126 | + *out = *in |
| 127 | + if in.Metadata != nil { |
| 128 | + in, out := &in.Metadata, &out.Metadata |
| 129 | + *out = new(ObjectMeta) |
| 130 | + (*in).DeepCopyInto(*out) |
| 131 | + } |
| 132 | +} |
| 133 | + |
| 134 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 135 | +func (in *ServiceAccountTemplate) DeepCopyInto(out *ServiceAccountTemplate) { |
| 136 | + *out = *in |
| 137 | + if in.Metadata != nil { |
| 138 | + in, out := &in.Metadata, &out.Metadata |
| 139 | + *out = new(ObjectMeta) |
| 140 | + (*in).DeepCopyInto(*out) |
| 141 | + } |
| 142 | +} |
| 143 | + |
| 144 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 145 | +func (in *DeploymentRuntimeConfigSpec) DeepCopyInto(out *DeploymentRuntimeConfigSpec) { |
| 146 | + *out = *in |
| 147 | + if in.DeploymentTemplate != nil { |
| 148 | + in, out := &in.DeploymentTemplate, &out.DeploymentTemplate |
| 149 | + *out = new(DeploymentTemplate) |
| 150 | + (*in).DeepCopyInto(*out) |
| 151 | + } |
| 152 | + if in.ServiceTemplate != nil { |
| 153 | + in, out := &in.ServiceTemplate, &out.ServiceTemplate |
| 154 | + *out = new(ServiceTemplate) |
| 155 | + (*in).DeepCopyInto(*out) |
| 156 | + } |
| 157 | + if in.ServiceAccountTemplate != nil { |
| 158 | + in, out := &in.ServiceAccountTemplate, &out.ServiceAccountTemplate |
| 159 | + *out = new(ServiceAccountTemplate) |
| 160 | + (*in).DeepCopyInto(*out) |
| 161 | + } |
| 162 | +} |
| 163 | + |
| 164 | +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. |
| 165 | +func (in *DeploymentRuntimeConfig) DeepCopyInto(out *DeploymentRuntimeConfig) { |
| 166 | + *out = *in |
| 167 | + out.TypeMeta = in.TypeMeta |
| 168 | + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) |
| 169 | + in.Spec.DeepCopyInto(&out.Spec) |
| 170 | +} |
| 171 | + |
| 172 | +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRuntimeConfig. |
| 173 | +func (in *DeploymentRuntimeConfig) DeepCopy() *DeploymentRuntimeConfig { |
| 174 | + if in == nil { |
| 175 | + return nil |
| 176 | + } |
| 177 | + out := new(DeploymentRuntimeConfig) |
| 178 | + in.DeepCopyInto(out) |
| 179 | + return out |
| 180 | +} |
0 commit comments