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

Add 'disable_tls' and 'dev_deployment' modifications #282

Closed
wants to merge 3 commits into from

Conversation

pvannierop
Copy link

@pvannierop pvannierop commented Jul 1, 2024

For local development I introduce the following modifications to the default RADAR-base deployment:

  • Disable TLS: this removes the TLS-redirection by the nginx reverse proxy. Also, prevents installation of the cert-manager and lets-encrypt cert resolver components
  • Disable monitoring and logging: prevents installation of the prometheus and monitoring/logging sidecar containers and graylog components.
  • Local development: Sets the number of brokers of all components to 1 (kafka, minio). Minimizes the JVM memory requirements of memory heavy components. Sets the server name to localhost. Disables atomicInstall.

@pvannierop pvannierop self-assigned this Jul 1, 2024
@pvannierop pvannierop requested a review from keyvaann July 1, 2024 19:29
@pvannierop pvannierop changed the base branch from main to dev July 1, 2024 19:29
@pvannierop pvannierop force-pushed the local-k3d-dev branch 3 times, most recently from cb67401 to 946ac46 Compare July 2, 2024 05:09
@pvannierop pvannierop changed the title Add 'disable_tls' and 'minimal_deployment' modifications Add 'disable_tls' and 'dev_deployment' modifications Jul 2, 2024
- ../etc/_mods/disable_tls.yaml
{{ end }}
{{ if .Values.dev_deployment }}
- ../etc/_mods/disable_tls.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

As the number of helmfile related configs have increased I suggest moving all of them to a different root directory, it will make things more clear and more easy to manage.

Copy link
Author

Choose a reason for hiding this comment

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

I moved the files to a new directory mods in the root.

configurationOverrides:
"offsets.topic.replication.factor": 1
cp_zookeeper:
servers: 1
Copy link
Collaborator

@keyvaann keyvaann Jul 11, 2024

Choose a reason for hiding this comment

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

Can we move the configs that make the apps run only one replica to the base.yaml? As we try to have a minimal working config in the default configuration I think it's good to have them there.

Copy link
Author

Choose a reason for hiding this comment

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

I would rather not do that in this PR. I would need to very carefully inspect the consequences because we change default behavior. Would be good to create a new issue for this.

cert_manager:
prometheus:
servicemonitor:
enabled: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be false?

Copy link
Author

Choose a reason for hiding this comment

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

I guess you are right.... Chnaged

sidecars: []
radar_grafana:
_install: false
radar_jdbc_connector:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aren't these part of RADAR-Base apps? Why are they being disabled?

Copy link
Author

Choose a reason for hiding this comment

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

Ah yes, I mistook it for graylog... updated.

{{ end }}
{{ if .Values.dev_deployment }}
- ../etc/_mods/disable_tls.yaml
- ../etc/_mods/disable_logging_and_monitoring.yaml
Copy link
Collaborator

@keyvaann keyvaann Jul 11, 2024

Choose a reason for hiding this comment

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

I think there should be a separate flag for disabling logging and monitoring and it should be true since it doesn't need to be enabled for a simple default installation.

Copy link
Author

Choose a reason for hiding this comment

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

I disabled logging and monitoring in the default deployment. We need to be careful here, because this change is not backwards compatible. We should provide a migration note here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes it's good to mention in release notes to manually enable these components during upgrade.

Copy link
Author

Choose a reason for hiding this comment

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

I also created a separate flag to disable monitoring and logging.

@keyvaann
Copy link
Collaborator

Closes #12

@pvannierop pvannierop force-pushed the local-k3d-dev branch 3 times, most recently from 77fa8c8 to 2f4c0c7 Compare July 18, 2024 12:38
- ../etc/secrets.yaml
default:
values:
- ../etc/base.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think it would be good to move these files helmfile related files to a separate directory as well? Probably something like helmfile_configs to put all of it's configuration related files in it.

Copy link
Author

Choose a reason for hiding this comment

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

I think this would make sense yes. Should we do this now? We have to make sure all the scripts in the /bin folder play nice with this change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be probably better in the long run make things more organized but we can do it later if it is easier.

- ../etc/production.yaml.gotmpl
- ../etc/secrets.yaml
{{ if not .Values.enable_tls }}
- ../mods/disable_tls.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

To reduce confusion I think these 2 lines should either be enable_tls or disable_tls

Copy link
Author

@pvannierop pvannierop Jul 19, 2024

Choose a reason for hiding this comment

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

It is a matter of API design, I guess. The config file disables tls and is, therefore, correctly named. What are the config options that we would like to present:

A:

# Enable logging and monitoring
enable_logging_monitoring: false
# Enable TLS redirection and retrieval of Let's Encrypt certificates.
# Can be disabled when TLS termination is handled upstream of the on-cluster Nginx reverse proxy.
enable_tls: true

B:

# Disable logging and monitoring
disable_logging_monitoring: true
# Disable TLS redirection and retrieval of Let's Encrypt certificates.
# Can be disabled when TLS termination is handled upstream of the on-cluster Nginx reverse proxy.
disable_tls: false

I am fine either way.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If there is a /mods/disable_tls.yaml and I think the variable should also be disable_tls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants