Skip to content

Commit 4ab897f

Browse files
committed
feat(template/helm): Don't include product repo in core operators
1 parent 6f83082 commit 4ab897f

5 files changed

Lines changed: 44 additions & 13 deletions

File tree

config/repositories.yaml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,72 +6,91 @@ repositories:
66
pretty_string: Apache Airflow
77
product_string: airflow
88
url: stackabletech/airflow-operator.git
9+
910
- name: commons-operator
10-
include_productconfig: false
11-
has_product: false
1211
pretty_string: Stackable Commons
1312
product_string: commons
1413
url: stackabletech/commons-operator.git
14+
config:
15+
include_productconfig: false
16+
has_product: false
17+
1518
- name: druid-operator
1619
pretty_string: Apache Druid
1720
product_string: druid
1821
url: stackabletech/druid-operator.git
22+
1923
- name: hbase-operator
2024
pretty_string: Apache HBase
2125
product_string: hbase
2226
url: stackabletech/hbase-operator.git
27+
2328
- name: hdfs-operator
2429
pretty_string: Apache HDFS
2530
product_string: hdfs
2631
url: stackabletech/hdfs-operator.git
32+
2733
- name: hive-operator
2834
pretty_string: Apache Hive
2935
product_string: hive
3036
url: stackabletech/hive-operator.git
37+
3138
- name: kafka-operator
3239
pretty_string: Apache Kafka
3340
product_string: kafka
3441
url: stackabletech/kafka-operator.git
42+
3543
- name: nifi-operator
3644
pretty_string: Apache NiFi
3745
product_string: nifi
3846
url: stackabletech/nifi-operator.git
47+
3948
- name: listener-operator
40-
include_productconfig: false
41-
has_product: false
4249
pretty_string: Stackable Listener Operator
4350
product_string: listener-operator
44-
run_as: custom
4551
url: stackabletech/listener-operator.git
52+
config:
53+
include_productconfig: false
54+
has_product: false
55+
run_as: custom
56+
4657
- name: opa-operator
47-
extra_crates:
48-
- stackable-opa-bundle-builder
4958
pretty_string: OpenPolicyAgent
5059
product_string: opa
5160
url: stackabletech/opa-operator.git
61+
config:
62+
extra_crates:
63+
- stackable-opa-bundle-builder
64+
5265
- name: opensearch-operator
5366
pretty_string: OpenSearch
5467
product_string: opensearch
5568
url: stackabletech/opensearch-operator.git
69+
5670
- name: secret-operator
57-
include_productconfig: false
58-
has_product: false
5971
pretty_string: Stackable Secret Operator
6072
product_string: secret-operator
61-
run_as: custom
6273
url: stackabletech/secret-operator.git
74+
config:
75+
include_productconfig: false
76+
has_product: false
77+
run_as: custom
78+
6379
- name: spark-k8s-operator
6480
pretty_string: Apache Spark-on-Kubernetes
6581
product_string: spark-k8s
6682
url: stackabletech/spark-k8s-operator.git
83+
6784
- name: superset-operator
6885
pretty_string: Apache Superset
6986
product_string: superset
7087
url: stackabletech/superset-operator.git
88+
7189
- name: trino-operator
7290
pretty_string: Trino
7391
product_string: trino
7492
url: stackabletech/trino-operator.git
93+
7594
- name: zookeeper-operator
7695
pretty_string: Apache ZooKeeper
7796
product_string: zookeeper

template/.github/ISSUE_TEMPLATE/02-bug_report.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
label: Affected Stackable version
1313
description: Which version of the Stackable Operator do you see this bug in?
1414

15-
# {[%- if operator.has_product | default(true) +%}]
15+
# {[%- if operator.config.has_product | default(true) +%}]
1616
- type: input
1717
attributes:
1818
label: Affected {[ operator.pretty_string }] version
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ registry = settings.get('default_registry', 'oci.stackable.tech')
1212
operator_repository = settings.get('default_operator_repository', registry + '/' + 'sandbox')
1313
operator_image_name = operator_repository + '/' + operator_name
1414

15+
{[% if operator.config.has_product | default(true) %}]
1516
# For the product image, we wanna use the images in the "sdp" namespace, because "sandbox" doesn't
1617
# contain those images (by default).
1718
product_repository = settings.get('default_product_repository', registry + '/' + 'sdp')
19+
{[%- endif %}]
1820

1921
# Configure default registry either read from config file above, or with default value of
2022
# "oci.stackable.tech"
@@ -41,15 +43,19 @@ k8s_kind('DaemonSet', image_json_path='{.spec.template.metadata.annotations.inte
4143
helm_values = settings.get('helm_values', None)
4244

4345
helm_override_operator_image_repository = 'image.repository=' + operator_repository
46+
{[% if operator.config.has_product | default(true) %}]
4447
helm_override_product_image_repository = 'image.productRepository=' + product_repository
48+
{[% endif %}]
4549

4650
k8s_yaml(helm(
4751
'deploy/helm/' + operator_name,
4852
name=operator_name,
4953
namespace="stackable-operators",
5054
set=[
5155
helm_override_operator_image_repository,
56+
{[% if operator.config.has_product | default(true) %}]
5257
helm_override_product_image_repository,
58+
{[% endif %}]
5359
],
5460
values=helm_values,
5561
))

template/deploy/helm/[[operator]]/templates/deployment.yaml.j2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{[% if operator.run_as is undefined or operator.run_as == "deployment" %}]
1+
{[% if operator.config.run_as is undefined or operator.config.run_as == "deployment" %}]
22
---
33
apiVersion: apps/v1
44
kind: Deployment
@@ -71,9 +71,15 @@ spec:
7171
- name: OPERATOR_SERVICE_NAME
7272
value: {{ include "operator.fullname" . }}
7373

74+
{[% if operator.config.has_product | default(true) %}]
7475
# The product image repository, like "oci.stackable.tech/sdp".
7576
- name: IMAGE_REPOSITORY
7677
value: {{ .Values.image.productRepository | default .Values.image.repository }}
78+
{[% else %}]
79+
# The image repository, like "oci.stackable.tech/sdp".
80+
- name: IMAGE_REPOSITORY
81+
value: {{ .Values.image.repository }}
82+
{[% endif %}]
7783

7884
# Operators need to know the node name they are running on, to e.g. discover the
7985
# Kubernetes domain name from the kubelet API.

template/docker/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ COPY LICENSE /licenses/LICENSE
191191
192192
COPY --from=builder --chown=${STACKABLE_USER_UID}:0 /app/* /usr/local/bin/
193193
194-
{[% if operator.include_productconfig is undefined or operator.include_productconfig == true %}]
194+
{[% if operator.config.include_productconfig is undefined or operator.config.include_productconfig == true %}]
195195
COPY deploy/config-spec/properties.yaml /etc/stackable/{[ operator.name }]/config-spec/properties.yaml
196196
{[% endif %}]
197197

0 commit comments

Comments
 (0)