Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2882 Add json configmap configurable with yaml to adf chart #387

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion charts/alfresco-adf-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: alfresco-adf-app
description: A generic Alfresco Development Framework Helm chart for Kubernetes
type: application
version: 0.2.0-alpha.0
version: 0.2.0-alpha.1
dependencies:
- name: alfresco-common
version: 3.1.3
Expand Down
3 changes: 2 additions & 1 deletion charts/alfresco-adf-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parent: Charts Reference

# alfresco-adf-app

![Version: 0.2.0-alpha.0](https://img.shields.io/badge/Version-0.2.0--alpha.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.2.0-alpha.1](https://img.shields.io/badge/Version-0.2.0--alpha.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A generic Alfresco Development Framework Helm chart for Kubernetes

Expand All @@ -22,6 +22,7 @@ Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| configMap | list | `[]` | |
| env | object | `{}` | |
| fullnameOverride | string | `""` | |
| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | If a private image registry a secret can be defined and passed to kubernetes, see: https://github.com/Alfresco/acs-deployment/blob/a924ad6670911f64f1bba680682d266dd4ea27fb/docs/helm/eks-deployment.md#docker-registry-secret |
Expand Down
11 changes: 11 additions & 0 deletions charts/alfresco-adf-app/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.configMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "alfresco-adf-app.fullname" . }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking that maybe we can hardcode the name of that configmap to make it easier for users to mount it. Not sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If user wants to mount his own cm I think we agreed he would:

  • create his own cm
  • create an extra volume for it (where he can use whatever name he wants)
  • create the volume mount that goes with it
    and so we would not have this configMap at all

If we agree on that, then we should document it in this chart

labels:
{{- include "alfresco-adf-app.labels" . | nindent 4 }}
data:
config.json: >-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we can hardcode that and if we need to add the volume mounts but I think its better if we leave volume mounts optional

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not only can we but we have to. However it should be named app.config.json IIRC

{{- .Values.configMap | toJson | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/alfresco-adf-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ volumes: []
# -- Additional volumeMounts on the output Deployment definition
volumeMounts: []

configMap: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If configmap is a list then I'm not sure how this works.
Do you expect to render a json list (I think that's not the expected format)? or do you plan to have more than one confimap (in which case we'd need an iterator somewhere)?

Copy link
Contributor Author

@pmacius pmacius Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning just to have one configmap. Whatever you put in yaml format it will be converted to json. I our case it can look like this:

configMap:
  $schema: "../../../node_modules/@alfresco/adf-core/app.config.schema.json"
  providers: ALL
  ecmHost: "{protocol}//{hostname}{:port}"
  bpmHost: "{protocol}//{hostname}{:port}"
  authType: OAUTH
  ...

Let me change that to {}


nodeSelector: {}

tolerations: []
Expand Down