Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Target repositories are configured in `repositories.yaml` in the following form:
| `url` | The github repository for this operator. Need to be in the form of `<org>/<repo>.git`. |
| `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" |
| `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. |
| `config.include_productconfig` | Whether to include files from the `deploy/config-spec` folder into the os package. *Default*: true |
| `config.has_product` | Indicates that the operator manages a product. This is particularly useful to differentiate between core and product operators. *Default*: true |
| `config.run_as` | Whether to run the operator as a default Deployment, or something custom. |

Expand Down
3 changes: 0 additions & 3 deletions config/repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ repositories:
product_string: commons
url: stackabletech/commons-operator.git
config:
include_productconfig: false
has_product: false

- name: druid-operator
Expand Down Expand Up @@ -50,7 +49,6 @@ repositories:
product_string: listener-operator
url: stackabletech/listener-operator.git
config:
include_productconfig: false
has_product: false
run_as: custom

Expand All @@ -72,7 +70,6 @@ repositories:
product_string: secret-operator
url: stackabletech/secret-operator.git
config:
include_productconfig: false
has_product: false
run_as: custom

Expand Down
3 changes: 3 additions & 0 deletions config/retired_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ retired_files:
- .github/ISSUE_TEMPLATE/normal-issue.md
- .github/ISSUE_TEMPLATE/new_version.md
- .github/ISSUE_TEMPLATE/bug_report.yml
- deploy/config-spec
- deploy/helm/[[operator.name]]/configs
- deploy/helm/[[operator.name]]/templates/configmap.yaml
2 changes: 1 addition & 1 deletion playbook/update_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

- name: "Operator [{{ operator.name }}] remove retired files and directories"
file:
path: "{{ work_dir }}/{{ operator.name }}/{{ item | replace('[[product]]', operator.product_string) }}"
path: "{{ work_dir }}/{{ operator.name }}/{{ item | replace('[[operator.name]]', operator.name) }}"
state: absent
with_items: "{{ retired_files | default([]) }}"
register: deletion_result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ Part of <https://github.com/stackabletech/issues/issues/TRACKING_ISSUE>
### Bump Rust Dependencies

- [ ] Bump `stackable-operator` and friends
- [ ] Bump `product-config`
- [ ] Bump all other dependencies
9 changes: 1 addition & 8 deletions template/Makefile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,15 @@ docker-build:
docker build --force-rm --build-arg VERSION=${VERSION} -t "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-${ARCH}" -f docker/Dockerfile .

## Chart related targets
compile-chart: version crds config
compile-chart: version crds

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

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

config:
if [ -d "deploy/config-spec/" ]; then\
mkdir -p "deploy/helm/${OPERATOR_NAME}/configs";\
cp -r deploy/config-spec/* "deploy/helm/${OPERATOR_NAME}/configs";\
fi

# We generate a crds.yaml, so that the effect of code changes are visible.
# The operator will take care of the CRD rollout itself.
crds:
Expand Down
6 changes: 0 additions & 6 deletions template/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ rec {
pkgsTarget.util-linuxMinimal
];
config = {
Env =
let
fileRefVars = {
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
};
in lib.concatLists (lib.mapAttrsToList (env: path: lib.optional (lib.pathExists path) "${env}=${path}") fileRefVars);
Entrypoint = [ entrypoint ];
Cmd = [ "run" ];
};
Expand Down
9 changes: 0 additions & 9 deletions template/deploy/helm/[[operator]]/templates/configmap.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ spec:
metadata:
annotations:
internal.stackable.tech/image: {{ include "operator.image" . }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -42,9 +41,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /etc/stackable/{{ include "operator.appname" . }}/config-spec
name: config-spec
env:
# The following env vars are passed as clap (think CLI) arguments to the operator.
# They are picked up by clap using the structs defied in the operator.
Expand Down Expand Up @@ -99,10 +95,6 @@ spec:
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
{[% endif %}]
volumes:
- name: config-spec
configMap:
name: {{ include "operator.fullname" . }}-configmap
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 0 additions & 4 deletions template/docker/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ COPY LICENSE /licenses/LICENSE

COPY --from=builder --chown=${STACKABLE_USER_UID}:0 /app/* /usr/local/bin/

{[% if operator.config.include_productconfig is undefined or operator.config.include_productconfig == true %}]
COPY deploy/config-spec/properties.yaml /etc/stackable/{[ operator.name }]/config-spec/properties.yaml
{[% endif %}]

USER ${STACKABLE_USER_UID}

ENTRYPOINT ["stackable-{[ operator.name }]"]
Expand Down