Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add DigitalOcean Support #104

Merged
merged 7 commits into from
Mar 8, 2022
Merged

Add DigitalOcean Support #104

merged 7 commits into from
Mar 8, 2022

Conversation

qdzlug
Copy link
Contributor

@qdzlug qdzlug commented Mar 8, 2022

Proposed changes

This change adds support for Digital Ocean, including the ability to stand up and tear down a K8 cluster as well as the additional logic required to deploy the monitoring/management resources and the Bank of Sirius application.

This change only works with the ingress-controller being deployed from the repo (NGINX or NGINX Plus). Full support for building the Ingress Controller, pushing to a private registry, etc will be implemented as part of #81. Full support for the IP/Hostname assigned by the K8 LoadBalancer object will continue to be managed by #82

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have written my commit messages in the Conventional Commits format.
  • I have read the CONTRIBUTING doc
  • I have added tests (when possible) that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@qdzlug qdzlug added the enhancement New feature or request label Mar 8, 2022
@qdzlug qdzlug requested a review from dekobon March 8, 2022 15:28
@qdzlug qdzlug changed the title Digitalocean Add DigitalOcean Support Mar 8, 2022
@@ -81,6 +81,11 @@ if pulumi config get kubernetes:infra_type -C ${script_dir}/../pulumi/python/con
sleep 5
${script_dir}/destroy_kube.sh
exit 0
elif [ $INFRA == 'DO' ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we need per provider logic, it may be better to have a fixed path where we look for a script with a filename that includes an identifier. If the script exists, then we execute it. If we start to fork a lot of logical paths for each provider, we may quickly have a mess. Take this with a grain of salt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once we get #81 and #82 sorted, I foresee this all being collapsed into one script where the provider is passed in as an argument (or read from the config).

@@ -378,6 +385,11 @@ def add_namespace(obj):
pulumi.export('ipaddress', lb_ingress_ip)
#pulumi.export('application_url', f'https://{lb_ingress_hostname}')
application_url = sirius_host.apply(lambda host: f'https://{host}')
elif infra_type == 'DO':
pulumi.export('hostname', lb_ingress_hostname)
pulumi.export('ipaddress', lb_ingress_ip)
Copy link
Collaborator

Choose a reason for hiding this comment

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

My mind desperately wants an underscore between ip and address.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mine too....but when I started digging I found out that it's "ipaddress" in all the library code so I decided to be consistent with the rest of the code.

@qdzlug qdzlug merged commit a737ab3 into nginxinc:master Mar 8, 2022
@qdzlug qdzlug deleted the digitalocean branch March 8, 2022 18:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants