-
Notifications
You must be signed in to change notification settings - Fork 1
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
ROX-20058: Use GCP secret manager + Helm for infra deployments #1015
Conversation
A single node development cluster (infra-pr-1015) was allocated in production infra for this PR. CI will attempt to deploy us.gcr.io/stackrox-infra/infra-server:0.8.2-22-gce8e555ae1 to it. 🔌 You can connect to this cluster with:
🛠️ And pull infractl from the deployed dev infra-server with:
🚲 You can then use the dev infra instance e.g.:
Further Development☕ If you make changes, you can commit and push and CI will take care of updating the development cluster. 🚀 If you only modify configuration (chart/infra-server/configuration) or templates (chart/infra-server/{static,templates}), you can get a faster update with:
LogsLogs for the development infra depending on your @redhat.com authuser: Or:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Other than my questions around ManagedCert/Ingress, I think this PR is good to go
|
||
- name: Notify infra channel about new version | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
uses: slackapi/slack-github-action@v1.23.0 | ||
with: | ||
channel-id: C01H4DC33K3 #acs-infra | ||
channel-id: CVANK5K5W #acs-infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
@@ -1,3 +1,4 @@ | |||
name: Deploy infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
############# | ||
## Linting ## | ||
############# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. Re-organizing files makes review extra hard. Re-org should be a separate PR IMhO. But not going to hold this PR back for it.
@@ -1,4 +1,4 @@ | |||
{{ if ne .Values.deployment "local" -}} | |||
{{- if .Capabilities.APIVersions.Has "networking.gke.io/v1/ManagedCertificate" -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to create the managedcertificate on infra PR instances with dev values. How will this affect the dev instance? If we are not sure, then best to avoid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The managed certificate will be stuck in Provisioning state for infra PR instances, because the certificate challenge cannot be reached on the {{ .Values.hosts.primary }}
or {{ .Values.hosts.secondary }}
.
No impact on the dev cluster other than some failed requests from GCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatabout using .Values.testMode
to exclude them? I get that they are probably harmless but given that dependabot can create lots of dev instances I'd prefer to avoid any issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK ce8e555
Changes
helm upgrade
.scripts/deploy
..Capabilities
API to avoid provisioning non-existent K8s resources, and thetestMode
value, which can be set to disable telemetry.Misc
How I tested my changes
Rollout on prod
make configuration-download
on masterReplacing ".Values.deployment" with ".Values.environment" in chart/infra-server/configuration/production/{auth0.yaml, oidc.yaml}
make create-consolidated-values
Validate "oidc_yaml" contains ".Values.environment":
Remove "auth0_yaml" (migrated to RHSSO), "google_calendar_credentials_json" (functionality removed), "gke__gke_credentials_json" (pre RH migration), all unused in chart.
Switch to
tm/helm-charts
branch.ENVIRONMENT=production make secrets-upload
Validate new secret shows updated values:
./scripts/deploy/secrets.sh show production latest
, selecting "oidc_yaml" shows the same output as (4).Validate you're pointing to the correct cluster:
kubectl config current-context
.Delete argo and infra namespaces and all secrets in default namespace (except default token). This is required to have a clean slate, otherwise conflicts with Helm unmanaged resources.
ENVIRONMENT=production make install-argo helm-deploy
.