diff --git a/deploy/crds/jaegertracing.io_jaegers_crd.yaml b/deploy/crds/jaegertracing.io_jaegers_crd.yaml index d3c6057571..580f8c9053 100644 --- a/deploy/crds/jaegertracing.io_jaegers_crd.yaml +++ b/deploy/crds/jaegertracing.io_jaegers_crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.4 + controller-gen.kubebuilder.io/version: v0.3.0 creationTimestamp: null name: jaegers.jaegertracing.io spec: @@ -589,6 +589,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic labels: additionalProperties: type: string @@ -600,11 +601,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object securityContext: @@ -662,6 +671,56 @@ spec: type: object serviceAccount: type: string + sidecarSecurityContext: + 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 + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object strategy: type: string tolerations: @@ -680,6 +739,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -700,6 +760,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -857,7 +918,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -873,7 +938,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -1098,7 +1167,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -1281,6 +1354,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object allInOne: properties: @@ -1566,11 +1640,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object securityContext: @@ -1644,6 +1726,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -1664,6 +1747,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -1821,7 +1905,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -1837,7 +1925,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -2062,7 +2154,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -2245,6 +2341,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object annotations: additionalProperties: @@ -2546,11 +2643,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object securityContext: @@ -2624,6 +2729,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -2644,6 +2750,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -2801,7 +2908,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -2817,7 +2928,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -3042,7 +3157,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -3225,6 +3344,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object ingester: properties: @@ -3521,11 +3641,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object securityContext: @@ -3599,6 +3727,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -3619,6 +3748,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -3776,7 +3906,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -3792,7 +3926,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -4017,7 +4155,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -4200,6 +4342,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object ingress: properties: @@ -4476,6 +4619,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic labels: additionalProperties: type: string @@ -4498,11 +4642,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object secretName: @@ -4571,10 +4723,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic secretName: type: string type: object type: array + x-kubernetes-list-type: atomic tolerations: items: properties: @@ -4591,6 +4745,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -4611,6 +4766,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -4768,7 +4924,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -4784,7 +4944,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -5009,7 +5173,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -5192,6 +5360,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object labels: additionalProperties: @@ -5482,11 +5651,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object securityContext: @@ -5562,6 +5739,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -5582,6 +5760,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -5739,7 +5918,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -5755,7 +5938,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -5980,7 +6167,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -6163,17 +6354,26 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object resources: nullable: true properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object sampling: @@ -6546,11 +6746,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object schedule: @@ -6631,6 +6839,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic ttlSecondsAfterFinished: format: int32 type: integer @@ -6654,6 +6863,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -6811,7 +7021,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -6827,7 +7041,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -7052,7 +7270,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -7235,6 +7457,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object elasticsearch: properties: @@ -7253,17 +7476,29 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object storage: properties: size: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true storageClassName: type: string type: object @@ -7552,11 +7787,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object schedule: @@ -7635,6 +7878,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic ttlSecondsAfterFinished: format: int32 type: integer @@ -7658,6 +7902,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -7815,7 +8060,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -7831,7 +8080,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -8056,7 +8309,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -8239,6 +8496,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object esRollover: properties: @@ -8524,11 +8782,19 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object schedule: @@ -8607,6 +8873,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic ttlSecondsAfterFinished: format: int32 type: integer @@ -8630,6 +8897,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -8787,7 +9055,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -8803,7 +9075,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -9028,7 +9304,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -9211,6 +9491,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object options: type: object @@ -9237,6 +9518,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic ui: properties: options: @@ -9262,6 +9544,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -9419,7 +9702,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -9435,7 +9722,11 @@ spec: medium: type: string sizeLimit: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: properties: @@ -9660,7 +9951,11 @@ spec: containerName: type: string divisor: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: type: string required: @@ -9843,6 +10138,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object status: properties: diff --git a/pkg/apis/jaegertracing/v1/jaeger_types.go b/pkg/apis/jaegertracing/v1/jaeger_types.go index 913b5f706c..bc8eab1be5 100644 --- a/pkg/apis/jaegertracing/v1/jaeger_types.go +++ b/pkg/apis/jaegertracing/v1/jaeger_types.go @@ -383,6 +383,9 @@ type JaegerAgentSpec struct { // +optional Config FreeForm `json:"config,omitempty"` + + // +optional + SidecarSecurityContext *v1.SecurityContext `json:"sidecarSecurityContext,omitempty"` } // JaegerStorageSpec defines the common storage options to be used for the query and collector diff --git a/pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go b/pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go index 676dbb12fb..c020e4c231 100644 --- a/pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go +++ b/pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go @@ -133,6 +133,11 @@ func (in *JaegerAgentSpec) DeepCopyInto(out *JaegerAgentSpec) { in.Options.DeepCopyInto(&out.Options) in.JaegerCommonSpec.DeepCopyInto(&out.JaegerCommonSpec) in.Config.DeepCopyInto(&out.Config) + if in.SidecarSecurityContext != nil { + in, out := &in.SidecarSecurityContext, &out.SidecarSecurityContext + *out = new(corev1.SecurityContext) + (*in).DeepCopyInto(*out) + } return } diff --git a/pkg/apis/jaegertracing/v1/zz_generated.openapi.go b/pkg/apis/jaegertracing/v1/zz_generated.openapi.go index f245547465..db639b273a 100644 --- a/pkg/apis/jaegertracing/v1/zz_generated.openapi.go +++ b/pkg/apis/jaegertracing/v1/zz_generated.openapi.go @@ -318,11 +318,16 @@ func schema_pkg_apis_jaegertracing_v1_JaegerAgentSpec(ref common.ReferenceCallba Ref: ref("./pkg/apis/jaegertracing/v1.FreeForm"), }, }, + "sidecarSecurityContext": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, }, }, }, Dependencies: []string{ - "./pkg/apis/jaegertracing/v1.FreeForm", "./pkg/apis/jaegertracing/v1.Options", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, + "./pkg/apis/jaegertracing/v1.FreeForm", "./pkg/apis/jaegertracing/v1.Options", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/inject/sidecar.go b/pkg/inject/sidecar.go index 13c5a14bf8..31042e0137 100644 --- a/pkg/inject/sidecar.go +++ b/pkg/inject/sidecar.go @@ -274,8 +274,9 @@ func container(jaeger *v1.Jaeger, dep *appsv1.Deployment) corev1.Container { Name: "admin-http", }, }, - Resources: commonSpec.Resources, - VolumeMounts: volumesAndMountsSpec.VolumeMounts, + Resources: commonSpec.Resources, + SecurityContext: jaeger.Spec.Agent.SidecarSecurityContext, + VolumeMounts: volumesAndMountsSpec.VolumeMounts, } } diff --git a/pkg/inject/sidecar_test.go b/pkg/inject/sidecar_test.go index bf6b3883a0..dacba2e1ab 100644 --- a/pkg/inject/sidecar_test.go +++ b/pkg/inject/sidecar_test.go @@ -850,3 +850,16 @@ func TestInjectSidecarOnOpenShift(t *testing.T) { assert.Len(t, dep.Spec.Template.Spec.Containers[1].VolumeMounts, 2) assert.Len(t, dep.Spec.Template.Spec.Volumes, 2) } + +func TestSidecarWithSecurityContext(t *testing.T) { + var user, group int64 = 111, 222 + expectedSecurityContext := &corev1.SecurityContext{RunAsUser: &user, RunAsGroup: &group} + + jaeger := v1.NewJaeger(types.NamespacedName{Name: "TestSidecarWithSecurityContext"}) + jaeger.Spec.Agent.SidecarSecurityContext = expectedSecurityContext + + dep := dep(map[string]string{}, map[string]string{}) + dep = Sidecar(jaeger, dep) + assert.Len(t, dep.Spec.Template.Spec.Containers, 2) + assert.Equal(t, dep.Spec.Template.Spec.Containers[1].SecurityContext, expectedSecurityContext) +}