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

Refactor deployment script and add autoscaler-secrets.yml template #3291

Merged
merged 7 commits into from
Oct 24, 2024

Conversation

bonzofenix
Copy link
Contributor

This pull request includes several updates to the autoscaler deployment scripts to streamline the handling of secrets and improve the deployment process. The most important changes include adding a template for autoscaler secrets, updating the deployment script to use this template, and modifying the handling of Prometheus alerts.

Improvements to secret management:

  • Added a new template file autoscaler-secrets.yml.tpl to manage secrets in a centralized manner. (ci/autoscaler/scripts/autoscaler-secrets.yml.tpl)
  • Updated the deploy-autoscaler.sh script to use the new autoscaler-secrets.yml.tpl file for interpolating secrets, reducing the need for multiple credhub get commands. (ci/autoscaler/scripts/deploy-autoscaler.sh)

Deployment script enhancements:

  • Fixed a minor syntax issue in the ops_files variable assignment within deploy-autoscaler.sh. (ci/autoscaler/scripts/deploy-autoscaler.sh)
  • Commented out the Prometheus alert silencing commands to avoid potential deployment failures related to alert silencing. (ci/autoscaler/scripts/deploy-autoscaler.sh) - Add a new autoscaler-secrets.yml.tpl file for managing autoscaler secrets
  • Streamline secret injection by using credhub interpolate with the new secrets template
  • Remove direct credhub get calls for secrets in the deploy-autoscaler.sh script
  • Comment out Prometheus alert silencing commands in the deploy function

@bonzofenix bonzofenix added the allow-acceptance-tests This label needs to be added to enable the acceptance tests to run. label Oct 23, 2024
 - Add a new autoscaler-secrets.yml.tpl file for managing autoscaler secrets
 - Streamline secret injection by using `credhub interpolate` with the new secrets template
 - Remove direct `credhub get` calls for secrets in the deploy-autoscaler.sh script
 - Comment out Prometheus alert silencing commands in the deploy function
@bonzofenix bonzofenix force-pushed the deploy-autoscaler-fetch-secrets-improvement branch from 6f7282b to 699b4d7 Compare October 23, 2024 14:04
@bonzofenix bonzofenix removed the allow-acceptance-tests This label needs to be added to enable the acceptance tests to run. label Oct 23, 2024
Copy link
Member

@salzmannsusan salzmannsusan left a comment

Choose a reason for hiding this comment

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

LGTM

 • Implement conditional inclusion of use-cf-services.yml based on enable_mtar flag in deploy-autoscaler.sh
 • Introduce ENABLE_MTAR environment variable with default false in vars.source.sh
@bonzofenix bonzofenix force-pushed the deploy-autoscaler-fetch-secrets-improvement branch from d7455e1 to c376f1b Compare October 23, 2024 15:33
@bonzofenix bonzofenix added the allow-acceptance-tests This label needs to be added to enable the acceptance tests to run. label Oct 23, 2024
…nterpolate and yq

 • Replace direct credhub secret retrieval with credhub interpolate to generate a secrets YAML file.
 • Utilize yq to extract secrets from the generated YAML file for environment variable assignment.
 • Streamline the process of setting environment variables for metrics forwarder and policy DB credentials, as well as syslog client certificates.
Copy link

sonarcloud bot commented Oct 24, 2024

@bonzofenix bonzofenix merged commit 8238795 into main Oct 24, 2024
20 of 25 checks passed
@bonzofenix bonzofenix deleted the deploy-autoscaler-fetch-secrets-improvement branch October 24, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allow-acceptance-tests This label needs to be added to enable the acceptance tests to run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants