Skip to content

Commit d9dc1d8

Browse files
committed
Product image selection (#356)
# Description fixes: #355 Waiting for OPA stackabletech/opa-operator#385 and Hive stackabletech/hive-operator#279 to be merged first. Co-authored-by: Malte Sander <[email protected]>
1 parent 792ae13 commit d9dc1d8

26 files changed

+291
-113
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
1515
- `operator-rs` `0.25.0` -> `0.27.1` ([#344]).
1616
- LDAP integration tests create all resources in their namespace and not some in the default namespace ([#344]).
1717
- Don't run init container as root and avoid chmod and chowning ([#353]).
18+
- [BREAKING] Use Product image selection instead of version. `spec.version` has been replaced by `spec.image` ([#356]).
1819

1920
### Fixed
2021

@@ -26,6 +27,7 @@ All notable changes to this project will be documented in this file.
2627
[#347]: https://github.com/stackabletech/trino-operator/pull/347
2728
[#348]: https://github.com/stackabletech/trino-operator/pull/348
2829
[#353]: https://github.com/stackabletech/trino-operator/pull/353
30+
[#356]: https://github.com/stackabletech/trino-operator/pull/356
2931

3032
## [0.8.0] - 2022-11-07
3133

deploy/crd/trinocluster.crd.yaml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,49 @@ spec:
623623
required:
624624
- roleGroups
625625
type: object
626+
image:
627+
anyOf:
628+
- required:
629+
- custom
630+
- productVersion
631+
- required:
632+
- productVersion
633+
- stackableVersion
634+
description: Trino product image to use
635+
properties:
636+
custom:
637+
description: Overwrite the docker image. Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0`
638+
type: string
639+
productVersion:
640+
description: Version of the product, e.g. `1.4.1`.
641+
type: string
642+
pullPolicy:
643+
default: IfNotPresent
644+
description: '[Pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) used when pulling the Images'
645+
enum:
646+
- IfNotPresent
647+
- Always
648+
- Never
649+
type: string
650+
pullSecrets:
651+
description: '[Image pull secrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) to pull images from a private registry'
652+
items:
653+
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
654+
properties:
655+
name:
656+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
657+
type: string
658+
type: object
659+
nullable: true
660+
type: array
661+
repo:
662+
description: Name of the docker repo, e.g. `docker.stackable.tech/stackable`
663+
nullable: true
664+
type: string
665+
stackableVersion:
666+
description: Stackable version of the product, e.g. 2.1.0
667+
type: string
668+
type: object
626669
opa:
627670
description: The discovery ConfigMap name of the OPA cluster (usually the same as the OPA cluster name).
628671
nullable: true
@@ -646,10 +689,6 @@ spec:
646689
description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would).
647690
nullable: true
648691
type: boolean
649-
version:
650-
description: The provided trino image version in the form `xxx-stackableY.Y.Y` e.g. `387-stackable0.1.0`.
651-
nullable: true
652-
type: string
653692
workers:
654693
description: Settings for the Worker Role/Process.
655694
nullable: true
@@ -1154,6 +1193,7 @@ spec:
11541193
type: object
11551194
required:
11561195
- catalogLabelSelector
1196+
- image
11571197
type: object
11581198
status:
11591199
nullable: true

deploy/helm/trino-operator/crds/crds.yaml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,49 @@ spec:
625625
required:
626626
- roleGroups
627627
type: object
628+
image:
629+
anyOf:
630+
- required:
631+
- custom
632+
- productVersion
633+
- required:
634+
- productVersion
635+
- stackableVersion
636+
description: Trino product image to use
637+
properties:
638+
custom:
639+
description: Overwrite the docker image. Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0`
640+
type: string
641+
productVersion:
642+
description: Version of the product, e.g. `1.4.1`.
643+
type: string
644+
pullPolicy:
645+
default: IfNotPresent
646+
description: '[Pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) used when pulling the Images'
647+
enum:
648+
- IfNotPresent
649+
- Always
650+
- Never
651+
type: string
652+
pullSecrets:
653+
description: '[Image pull secrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) to pull images from a private registry'
654+
items:
655+
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
656+
properties:
657+
name:
658+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
659+
type: string
660+
type: object
661+
nullable: true
662+
type: array
663+
repo:
664+
description: Name of the docker repo, e.g. `docker.stackable.tech/stackable`
665+
nullable: true
666+
type: string
667+
stackableVersion:
668+
description: Stackable version of the product, e.g. 2.1.0
669+
type: string
670+
type: object
628671
opa:
629672
description: The discovery ConfigMap name of the OPA cluster (usually the same as the OPA cluster name).
630673
nullable: true
@@ -648,10 +691,6 @@ spec:
648691
description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would).
649692
nullable: true
650693
type: boolean
651-
version:
652-
description: The provided trino image version in the form `xxx-stackableY.Y.Y` e.g. `387-stackable0.1.0`.
653-
nullable: true
654-
type: string
655694
workers:
656695
description: Settings for the Worker Role/Process.
657696
nullable: true
@@ -1156,6 +1195,7 @@ spec:
11561195
type: object
11571196
required:
11581197
- catalogLabelSelector
1198+
- image
11591199
type: object
11601200
status:
11611201
nullable: true

deploy/manifests/crds.yaml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,49 @@ spec:
626626
required:
627627
- roleGroups
628628
type: object
629+
image:
630+
anyOf:
631+
- required:
632+
- custom
633+
- productVersion
634+
- required:
635+
- productVersion
636+
- stackableVersion
637+
description: Trino product image to use
638+
properties:
639+
custom:
640+
description: Overwrite the docker image. Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0`
641+
type: string
642+
productVersion:
643+
description: Version of the product, e.g. `1.4.1`.
644+
type: string
645+
pullPolicy:
646+
default: IfNotPresent
647+
description: '[Pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) used when pulling the Images'
648+
enum:
649+
- IfNotPresent
650+
- Always
651+
- Never
652+
type: string
653+
pullSecrets:
654+
description: '[Image pull secrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) to pull images from a private registry'
655+
items:
656+
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
657+
properties:
658+
name:
659+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
660+
type: string
661+
type: object
662+
nullable: true
663+
type: array
664+
repo:
665+
description: Name of the docker repo, e.g. `docker.stackable.tech/stackable`
666+
nullable: true
667+
type: string
668+
stackableVersion:
669+
description: Stackable version of the product, e.g. 2.1.0
670+
type: string
671+
type: object
629672
opa:
630673
description: The discovery ConfigMap name of the OPA cluster (usually the same as the OPA cluster name).
631674
nullable: true
@@ -649,10 +692,6 @@ spec:
649692
description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would).
650693
nullable: true
651694
type: boolean
652-
version:
653-
description: The provided trino image version in the form `xxx-stackableY.Y.Y` e.g. `387-stackable0.1.0`.
654-
nullable: true
655-
type: string
656695
workers:
657696
description: Settings for the Worker Role/Process.
658697
nullable: true
@@ -1157,6 +1196,7 @@ spec:
11571196
type: object
11581197
required:
11591198
- catalogLabelSelector
1199+
- image
11601200
type: object
11611201
status:
11621202
nullable: true

docs/modules/getting_started/examples/code/trino.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ kind: TrinoCluster
44
metadata:
55
name: simple-trino
66
spec:
7-
version: 396-stackable0.2.0
7+
image:
8+
productVersion: 396
9+
stackableVersion: 0.2.0
810
catalogLabelSelector:
911
matchLabels:
1012
trino: simple-trino

docs/modules/usage_guide/examples/code/trino-file-authentication.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ kind: TrinoCluster
1414
metadata:
1515
name: simple-trino
1616
spec:
17-
version: 396-stackable0.2.0
17+
image:
18+
productVersion: 396
19+
stackableVersion: 0.2.0
1820
catalogLabelSelector: {}
1921
authentication:
2022
method:

docs/modules/usage_guide/examples/code/trino-insecure.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ kind: TrinoCluster
1616
metadata:
1717
name: simple-trino
1818
spec:
19-
version: 396-stackable0.2.0
19+
image:
20+
productVersion: 396
21+
stackableVersion: 0.2.0
2022
catalogLabelSelector:
2123
matchLabels:
2224
trino: simple-trino
@@ -34,7 +36,9 @@ kind: HiveCluster
3436
metadata:
3537
name: simple-hive-derby
3638
spec:
37-
version: 3.1.3-stackable0.2.0
39+
image:
40+
productVersion: 3.1.3
41+
stackableVersion: 0.2.0
3842
metastore:
3943
roleGroups:
4044
default:

docs/modules/usage_guide/examples/code/trino-ldap-authentication.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ kind: TrinoCluster
4242
metadata:
4343
name: simple-trino-with-ldap
4444
spec:
45-
version: 396-stackable0.2.0
45+
image:
46+
productVersion: 396
47+
stackableVersion: 0.2.0
4648
catalogLabelSelector: {}
47-
config:
4849
authentication:
4950
method:
5051
ldap:

docs/modules/usage_guide/examples/code/trino-secure-internal-tls.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ kind: TrinoCluster
1616
metadata:
1717
name: simple-trino
1818
spec:
19-
version: 396-stackable0.2.0
19+
image:
20+
productVersion: 396
21+
stackableVersion: 0.2.0
2022
config:
2123
internalTls:
2224
secretClass: trino-internal-tls # <1>
@@ -64,7 +66,9 @@ kind: HiveCluster
6466
metadata:
6567
name: simple-hive-derby
6668
spec:
67-
version: 3.1.3-stackable0.2.0
69+
image:
70+
productVersion: 3.1.3
71+
stackableVersion: 0.2.0
6872
metastore:
6973
roleGroups:
7074
default:

docs/modules/usage_guide/examples/code/trino-secure-tls-only.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ kind: TrinoCluster
1616
metadata:
1717
name: simple-trino
1818
spec:
19-
version: 396-stackable0.2.0
19+
image:
20+
productVersion: 396
21+
stackableVersion: 0.2.0
2022
config:
2123
tls:
2224
secretClass: trino-tls # <1>
@@ -50,7 +52,9 @@ kind: HiveCluster
5052
metadata:
5153
name: simple-hive-derby
5254
spec:
53-
version: 3.1.3-stackable0.2.0
55+
image:
56+
productVersion: 3.1.3
57+
stackableVersion: 0.2.0
5458
metastore:
5559
roleGroups:
5660
default:

docs/modules/usage_guide/examples/code/trino-secure-tls.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ kind: TrinoCluster
1616
metadata:
1717
name: simple-trino
1818
spec:
19-
version: 396-stackable0.2.0
19+
image:
20+
productVersion: 396
21+
stackableVersion: 0.2.0
2022
config:
2123
tls:
2224
secretClass: trino-tls # <1>
@@ -64,7 +66,9 @@ kind: HiveCluster
6466
metadata:
6567
name: simple-hive-derby
6668
spec:
67-
version: 3.1.3-stackable0.2.0
69+
image:
70+
productVersion: 3.1.3
71+
stackableVersion: 0.2.0
6872
metastore:
6973
roleGroups:
7074
default:

docs/modules/usage_guide/pages/catalogs/index.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ kind: TrinoCluster
6969
metadata:
7070
name: simple-trino
7171
spec:
72-
version: 396-stackable0.2.0
72+
image:
73+
productVersion: 396
74+
stackableVersion: 0.2.0
7375
catalogLabelSelector:
7476
matchLabels:
7577
trino: simple-trino

examples/simple-trino-cluster-authentication-opa-authorization-s3.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ kind: TrinoCluster
44
metadata:
55
name: simple-trino
66
spec:
7-
version: 396-stackable0.2.0
7+
image:
8+
productVersion: 396
9+
stackableVersion: 0.2.0
810
opa:
911
configMapName: simple-opa
1012
package: trino
@@ -43,7 +45,9 @@ kind: OpaCluster
4345
metadata:
4446
name: simple-opa
4547
spec:
46-
version: 0.45.0-stackable0.2.0
48+
image:
49+
productVersion: 0.45.0
50+
stackableVersion: 0.2.0
4751
servers:
4852
roleGroups:
4953
default: {}
@@ -100,7 +104,9 @@ kind: HiveCluster
100104
metadata:
101105
name: simple-hive-derby
102106
spec:
103-
version: 3.1.3-stackable0.2.0
107+
image:
108+
productVersion: 3.1.3
109+
stackableVersion: 0.2.0
104110
metastore:
105111
roleGroups:
106112
default:

0 commit comments

Comments
 (0)