-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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 |
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.
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 |
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.
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).
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?
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
Checklist if making changes to Kubernetes:
After merging this PR