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

Automatic VPN Config Generation #2941

Merged
merged 7 commits into from
Sep 12, 2024
Merged

Automatic VPN Config Generation #2941

merged 7 commits into from
Sep 12, 2024

Conversation

ben851
Copy link
Collaborator

@ben851 ben851 commented Sep 11, 2024

What happens when your PR merges?

This will automatically generate the VPN Config for staging and production so that we don't have to manage 1Password secrets for github action VPN config manually.

What are you changing?

  • Releasing a new version of Notify
  • Changing kubernetes configuration
  • Github workflows

Provide some background on the changes

We are changing the VPN config in notification-terraform, and unless we apply these changes, we would have to manually modify the VPN config files.

If you are releasing a new version of Notify, what components are you updating

  • API
  • Admin
  • Documentation
  • Document download API

Checklist if making changes to Kubernetes:

  • I know how to get kubectl credentials in case it catches on fire

After merging this PR

  • I have verified that the tests / deployment actions succeeded
  • I have verified that any affected pods were restarted successfully
  • I have verified that I can still log into Notify production
  • I have verified that the smoke tests still pass on production
  • I have communicated the release in the #notify Slack channel.

@ben851 ben851 requested a review from a team September 11, 2024 12:47
@ben851 ben851 requested a review from jimleroyer as a code owner September 11, 2024 12:47
Copy link

github-actions bot commented Sep 11, 2024

ingress	nginx    	2       	2024-02-12 19:08:42.93215444 +0000 UTC	deployed	nginx-ingress-1.1.2	3.4.2      

xray-daemon	xray     	1       	2024-07-29 19:45:48.684608347 +0000 UTC	deployed	aws-xray-4.0.8	3.3.12     

Comparing release=karpenter-crd, chart=/tmp/helmfile2889160117/karpenter/staging/karpenter-crd/karpenter-crd/0.36.1/karpenter-crd
Comparing release=karpenter, chart=/tmp/helmfile2889160117/karpenter/staging/karpenter/karpenter/0.36.1/karpenter
Comparing release=karpenter-nodepool, chart=charts/karpenter-nodepool
Comparing release=priority-classes, chart=deliveryhero/priority-class
Comparing release=secrets-store-csi-driver, chart=secrets-store-csi-driver/secrets-store-csi-driver
Comparing release=aws-secrets-provider, chart=aws-secrets-manager/secrets-store-csi-driver-provider-aws
Comparing release=kube-state-metrics, chart=prometheus-community/kube-state-metrics
Comparing release=blazer, chart=stakater/application
Comparing release=ingress, chart=charts/nginx-ingress
Comparing release=xray-daemon, chart=okgolove/aws-xray

</cert>" >> /var/tmp/production.ovpn
echo "<key>
$KEY
</key>" >> /var/tmp/production.ovpn
Copy link
Member

Choose a reason for hiding this comment

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

That seems to warrant a dedicated script for it, as this would reduce the mental load of reading this file, minimize code duplication and ease up maintenance altogether.

aws ec2 export-client-vpn-client-configuration --client-vpn-endpoint-id $ENDPOINT_ID --output text > /var/tmp/production.ovpn
echo "<cert>
$CERT
</cert>" >> /var/tmp/production.ovpn
Copy link
Member

Choose a reason for hiding this comment

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

We might want to be extra safe and silence potential errors 2>/dev/null in case something bad happens (unlikely things such as no space left on device, folder not existing, etc).

@ben851 ben851 enabled auto-merge (squash) September 12, 2024 12:47
@ben851 ben851 merged commit fa3d9fc into main Sep 12, 2024
5 checks passed
@ben851 ben851 deleted the auto-vpn branch September 12, 2024 12:48
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.

4 participants