Skip to content

Commit 5c168f3

Browse files
chore: Remove product-config (#613)
* chore: Remove product-config * Retire former product-config files
1 parent 2904ad7 commit 5c168f3

10 files changed

Lines changed: 5 additions & 41 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Target repositories are configured in `repositories.yaml` in the following form:
5555
| `url` | The github repository for this operator. Need to be in the form of `<org>/<repo>.git`. |
5656
| `product_string` | A lower case string to use in config files, file names and the like. Should not contain whitespaces. This can sometimes be a shortened version of the full name, for example for Open Policy Agent this would be "opa" |
5757
| `pretty_string` | The actual name of the product, including whitespaces and proper capitalization. This is intended to be used in doc or man files or similar things. |
58-
| `config.include_productconfig` | Whether to include files from the `deploy/config-spec` folder into the os package. *Default*: true |
5958
| `config.has_product` | Indicates that the operator manages a product. This is particularly useful to differentiate between core and product operators. *Default*: true |
6059
| `config.run_as` | Whether to run the operator as a default Deployment, or something custom. |
6160

config/repositories.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ repositories:
1212
product_string: commons
1313
url: stackabletech/commons-operator.git
1414
config:
15-
include_productconfig: false
1615
has_product: false
1716

1817
- name: druid-operator
@@ -50,7 +49,6 @@ repositories:
5049
product_string: listener-operator
5150
url: stackabletech/listener-operator.git
5251
config:
53-
include_productconfig: false
5452
has_product: false
5553
run_as: custom
5654

@@ -72,7 +70,6 @@ repositories:
7270
product_string: secret-operator
7371
url: stackabletech/secret-operator.git
7472
config:
75-
include_productconfig: false
7673
has_product: false
7774
run_as: custom
7875

config/retired_files.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ retired_files:
99
- .github/ISSUE_TEMPLATE/normal-issue.md
1010
- .github/ISSUE_TEMPLATE/new_version.md
1111
- .github/ISSUE_TEMPLATE/bug_report.yml
12+
- deploy/config-spec
13+
- deploy/helm/[[operator.name]]/configs
14+
- deploy/helm/[[operator.name]]/templates/configmap.yaml

playbook/update_repo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
- name: "Operator [{{ operator.name }}] remove retired files and directories"
8686
file:
87-
path: "{{ work_dir }}/{{ operator.name }}/{{ item | replace('[[product]]', operator.product_string) }}"
87+
path: "{{ work_dir }}/{{ operator.name }}/{{ item | replace('[[operator.name]]', operator.name) }}"
8888
state: absent
8989
with_items: "{{ retired_files | default([]) }}"
9090
register: deletion_result

template/.github/PULL_REQUEST_TEMPLATE/pre-release-rust-deps.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ Part of <https://github.com/stackabletech/issues/issues/TRACKING_ISSUE>
3232
### Bump Rust Dependencies
3333

3434
- [ ] Bump `stackable-operator` and friends
35-
- [ ] Bump `product-config`
3635
- [ ] Bump all other dependencies

template/Makefile.j2

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,15 @@ docker-build:
2828
docker build --force-rm --build-arg VERSION=${VERSION} -t "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-${ARCH}" -f docker/Dockerfile .
2929

3030
## Chart related targets
31-
compile-chart: version crds config
31+
compile-chart: version crds
3232

3333
chart-clean:
34-
rm -rf "deploy/helm/${OPERATOR_NAME}/configs"
3534
rm -rf "deploy/helm/${OPERATOR_NAME}/crds"
3635

3736
version:
3837
cat "deploy/helm/${OPERATOR_NAME}/Chart.yaml" | yq ".version = \"${VERSION}\" | .appVersion = \"${VERSION}\"" > "deploy/helm/${OPERATOR_NAME}/Chart.yaml.new"
3938
mv "deploy/helm/${OPERATOR_NAME}/Chart.yaml.new" "deploy/helm/${OPERATOR_NAME}/Chart.yaml"
4039

41-
config:
42-
if [ -d "deploy/config-spec/" ]; then\
43-
mkdir -p "deploy/helm/${OPERATOR_NAME}/configs";\
44-
cp -r deploy/config-spec/* "deploy/helm/${OPERATOR_NAME}/configs";\
45-
fi
46-
4740
# We generate a crds.yaml, so that the effect of code changes are visible.
4841
# The operator will take care of the CRD rollout itself.
4942
crds:

template/default.nix

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,6 @@ rec {
151151
pkgsTarget.util-linuxMinimal
152152
];
153153
config = {
154-
Env =
155-
let
156-
fileRefVars = {
157-
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
158-
};
159-
in lib.concatLists (lib.mapAttrsToList (env: path: lib.optional (lib.pathExists path) "${env}=${path}") fileRefVars);
160154
Entrypoint = [ entrypoint ];
161155
Cmd = [ "run" ];
162156
};

template/deploy/helm/[[operator]]/templates/configmap.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ spec:
1717
metadata:
1818
annotations:
1919
internal.stackable.tech/image: {{ include "operator.image" . }}
20-
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2120
{{- with .Values.podAnnotations }}
2221
{{- toYaml . | nindent 8 }}
2322
{{- end }}
@@ -42,9 +41,6 @@ spec:
4241
imagePullPolicy: {{ .Values.image.pullPolicy }}
4342
resources:
4443
{{- toYaml .Values.resources | nindent 12 }}
45-
volumeMounts:
46-
- mountPath: /etc/stackable/{{ include "operator.appname" . }}/config-spec
47-
name: config-spec
4844
env:
4945
# The following env vars are passed as clap (think CLI) arguments to the operator.
5046
# They are picked up by clap using the structs defied in the operator.
@@ -99,10 +95,6 @@ spec:
9995
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
10096
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
10197
{[% endif %}]
102-
volumes:
103-
- name: config-spec
104-
configMap:
105-
name: {{ include "operator.fullname" . }}-configmap
10698
{{- with .Values.nodeSelector }}
10799
nodeSelector:
108100
{{- toYaml . | nindent 8 }}

template/docker/Dockerfile.j2

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ COPY LICENSE /licenses/LICENSE
191191
192192
COPY --from=builder --chown=${STACKABLE_USER_UID}:0 /app/* /usr/local/bin/
193193
194-
{[% if operator.config.include_productconfig is undefined or operator.config.include_productconfig == true %}]
195-
COPY deploy/config-spec/properties.yaml /etc/stackable/{[ operator.name }]/config-spec/properties.yaml
196-
{[% endif %}]
197-
198194
USER ${STACKABLE_USER_UID}
199195
200196
ENTRYPOINT ["stackable-{[ operator.name }]"]

0 commit comments

Comments
 (0)