diff --git a/api/v1alpha1/privateloadzone_types.go b/api/v1alpha1/privateloadzone_types.go index bb1de716..fa033441 100644 --- a/api/v1alpha1/privateloadzone_types.go +++ b/api/v1alpha1/privateloadzone_types.go @@ -32,11 +32,12 @@ import ( // PrivateLoadZoneSpec defines the desired state of PrivateLoadZone type PrivateLoadZoneSpec struct { - Token string `json:"token"` - Resources corev1.ResourceRequirements `json:"resources"` - ServiceAccountName string `json:"serviceAccountName,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Image string `json:"image,omitempty"` + Token string `json:"token"` + Resources corev1.ResourceRequirements `json:"resources"` + ServiceAccountName string `json:"serviceAccountName,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Image string `json:"image,omitempty"` + ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` } // PrivateLoadZoneStatus defines the observed state of PrivateLoadZone diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index ffc2f65e..e65a4851 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -387,6 +387,11 @@ func (in *PrivateLoadZoneSpec) DeepCopyInto(out *PrivateLoadZoneSpec) { (*out)[key] = val } } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]v1.LocalObjectReference, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateLoadZoneSpec. diff --git a/charts/k6-operator/templates/crds/k6.yaml b/charts/k6-operator/templates/crds/k6.yaml index aab0fba7..15c4c475 100644 --- a/charts/k6-operator/templates/crds/k6.yaml +++ b/charts/k6-operator/templates/crds/k6.yaml @@ -7,8 +7,8 @@ metadata: {{- include "k6-operator.labels" . | nindent 4 }} {{- include "k6-operator.customLabels" . | nindent 4 }} annotations: + controller-gen.kubebuilder.io/version: v0.14.0 {{- include "k6-operator.customAnnotations" . | nindent 4 }} - controller-gen.kubebuilder.io/version: v0.3.0 name: k6s.k6.io spec: group: k6.io @@ -30,6 +30,8 @@ spec: - jsonPath: .status.testRunId name: TestRunID type: string + deprecated: true + deprecationWarning: This CRD is deprecated in favor of testruns.k6.io name: v1alpha1 schema: openAPIV3Schema: @@ -92,6 +94,7 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic weight: format: int32 type: integer @@ -138,10 +141,12 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: properties: @@ -173,6 +178,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -196,6 +202,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -239,6 +246,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -262,6 +270,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -303,6 +312,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -326,6 +336,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -369,6 +380,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -392,6 +404,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -406,6 +419,67 @@ spec: type: object automountServiceAccountToken: type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object env: items: properties: @@ -426,6 +500,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -435,6 +510,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -450,6 +526,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -461,6 +538,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -476,6 +554,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -485,6 +564,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -497,6 +577,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic type: array initContainers: items: @@ -529,6 +610,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -538,6 +620,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -553,6 +636,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -564,6 +648,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -579,6 +664,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -588,6 +674,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -884,67 +971,6 @@ spec: type: string type: object type: object - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object serviceAccountName: type: string tolerations: @@ -963,6 +989,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeMounts: items: properties: @@ -1047,6 +1125,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -1063,6 +1142,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -1093,6 +1173,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -1104,6 +1185,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -1130,6 +1212,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -1150,6 +1233,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -1190,6 +1274,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -1258,6 +1343,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string volumeMode: @@ -1304,6 +1390,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -1388,6 +1475,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -1468,6 +1556,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -1482,6 +1571,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -1502,6 +1592,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -1529,6 +1620,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -1583,6 +1675,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -1604,6 +1697,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: @@ -1655,6 +1749,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: @@ -1697,6 +1792,7 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort @@ -1748,6 +1844,7 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic weight: format: int32 type: integer @@ -1794,10 +1891,12 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: properties: @@ -1829,6 +1928,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -1852,6 +1952,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -1895,6 +1996,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -1918,6 +2020,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -1959,6 +2062,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -1982,6 +2086,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -2025,6 +2130,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -2048,6 +2154,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -2062,6 +2169,67 @@ spec: type: object automountServiceAccountToken: type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object env: items: properties: @@ -2082,6 +2250,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2091,6 +2260,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2106,6 +2276,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2117,6 +2288,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2132,6 +2304,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -2141,6 +2314,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2153,6 +2327,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic type: array initContainers: items: @@ -2185,6 +2360,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2194,6 +2370,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2209,6 +2386,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2220,6 +2398,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2235,6 +2414,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -2244,6 +2424,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2540,67 +2721,6 @@ spec: type: string type: object type: object - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object serviceAccountName: type: string tolerations: @@ -2619,6 +2739,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeMounts: items: properties: @@ -2703,6 +2875,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -2719,6 +2892,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -2749,6 +2923,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -2760,6 +2935,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -2786,6 +2962,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -2806,6 +2983,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -2846,6 +3024,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -2914,6 +3093,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string volumeMode: @@ -2960,6 +3140,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -3044,6 +3225,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -3124,6 +3306,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -3138,6 +3321,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -3158,6 +3342,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -3185,6 +3370,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -3239,6 +3425,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -3260,6 +3447,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: @@ -3311,6 +3499,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: @@ -3353,6 +3542,8 @@ spec: type: string name: type: string + readOnly: + type: boolean required: - name type: object @@ -3426,6 +3617,7 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic weight: format: int32 type: integer @@ -3472,10 +3664,12 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: properties: @@ -3507,6 +3701,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -3530,6 +3725,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -3573,6 +3769,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -3596,6 +3793,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -3637,6 +3835,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -3660,6 +3859,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -3703,6 +3903,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: properties: matchExpressions: @@ -3726,6 +3927,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string @@ -3740,6 +3942,67 @@ spec: type: object automountServiceAccountToken: type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object env: items: properties: @@ -3760,6 +4023,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3769,6 +4033,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3784,6 +4049,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3795,6 +4061,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -3810,6 +4077,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -3819,6 +4087,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -3831,6 +4100,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic type: array initContainers: items: @@ -3863,6 +4133,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3872,6 +4143,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3887,6 +4159,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3898,6 +4171,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -3913,6 +4187,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: @@ -3922,6 +4197,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -4218,67 +4494,6 @@ spec: type: string type: object type: object - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object serviceAccountName: type: string tolerations: @@ -4297,6 +4512,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeMounts: items: properties: @@ -4381,6 +4648,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -4397,6 +4665,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -4427,6 +4696,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -4438,6 +4708,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -4464,6 +4735,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -4484,6 +4756,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -4524,6 +4797,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -4592,6 +4866,7 @@ spec: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string volumeMode: @@ -4638,6 +4913,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -4722,6 +4998,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -4802,6 +5079,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -4816,6 +5094,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -4836,6 +5115,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -4863,6 +5143,7 @@ spec: optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -4917,6 +5198,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -4938,6 +5220,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: @@ -4989,6 +5272,7 @@ spec: name: type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: diff --git a/charts/k6-operator/templates/crds/plz.yaml b/charts/k6-operator/templates/crds/plz.yaml index 52d4865e..65e1da9a 100644 --- a/charts/k6-operator/templates/crds/plz.yaml +++ b/charts/k6-operator/templates/crds/plz.yaml @@ -8,7 +8,7 @@ metadata: {{- include "k6-operator.customLabels" . | nindent 4 }} annotations: {{- include "k6-operator.customAnnotations" . | nindent 4 }} - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: privateloadzones.k6.io spec: group: k6.io @@ -31,6 +31,16 @@ spec: type: object spec: properties: + image: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + type: array nodeSelector: additionalProperties: type: string diff --git a/charts/k6-operator/templates/crds/testrun.yaml b/charts/k6-operator/templates/crds/testrun.yaml index 89608ca8..54e2953f 100644 --- a/charts/k6-operator/templates/crds/testrun.yaml +++ b/charts/k6-operator/templates/crds/testrun.yaml @@ -1,4 +1,3 @@ - {{- if .Values.installCRDs -}} --- apiVersion: apiextensions.k8s.io/v1 @@ -10,7 +9,7 @@ metadata: {{- include "k6-operator.customLabels" . | nindent 4 }} annotations: {{- include "k6-operator.customAnnotations" . | nindent 4 }} - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: testruns.k6.io spec: group: k6.io @@ -3542,6 +3541,8 @@ spec: type: string name: type: string + readOnly: + type: boolean required: - name type: object diff --git a/config/crd/bases/k6.io_privateloadzones.yaml b/config/crd/bases/k6.io_privateloadzones.yaml index 8084fecc..3ce91732 100644 --- a/config/crd/bases/k6.io_privateloadzones.yaml +++ b/config/crd/bases/k6.io_privateloadzones.yaml @@ -28,6 +28,14 @@ spec: properties: image: type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + type: array nodeSelector: additionalProperties: type: string diff --git a/pkg/testrun/plz.go b/pkg/testrun/plz.go index 683d52a9..bbe42ef7 100644 --- a/pkg/testrun/plz.go +++ b/pkg/testrun/plz.go @@ -47,6 +47,7 @@ func NewPLZTestRun(plz *v1alpha1.PrivateLoadZone, trData *cloud.TestRunData, ing Spec: v1alpha1.TestRunSpec{ Runner: v1alpha1.Pod{ Image: trData.RunnerImage, + ImagePullSecrets: plz.Spec.ImagePullSecrets, ServiceAccountName: plz.Spec.ServiceAccountName, NodeSelector: plz.Spec.NodeSelector, Resources: plz.Spec.Resources, @@ -64,6 +65,7 @@ func NewPLZTestRun(plz *v1alpha1.PrivateLoadZone, trData *cloud.TestRunData, ing Starter: v1alpha1.Pod{ ServiceAccountName: plz.Spec.ServiceAccountName, NodeSelector: plz.Spec.NodeSelector, + ImagePullSecrets: plz.Spec.ImagePullSecrets, }, Script: v1alpha1.K6Script{ LocalFile: "/test/archive.tar", diff --git a/pkg/types/script.go b/pkg/types/script.go index e8f99bd9..3ccdbc66 100644 --- a/pkg/types/script.go +++ b/pkg/types/script.go @@ -10,7 +10,7 @@ import ( // Internal type created to support Spec.script options type Script struct { Name string // Name of ConfigMap or VolumeClaim or "LocalFile" - ReadOnly bool // VolumeClaim only + ReadOnly bool // VolumeClaim only Filename string Path string Type string // ConfigMap | VolumeClaim | LocalFile