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

feat: Add terraform module #198

Merged
merged 21 commits into from
Sep 16, 2024
Merged

feat: Add terraform module #198

merged 21 commits into from
Sep 16, 2024

Conversation

orfeas-k
Copy link
Contributor

@orfeas-k orfeas-k commented Sep 9, 2024

Adds a terraform module, as designed in CC006 - Terraform modules organization in the Juju ecosystem spec. The module facilitates the deployment of argo-controller charm, using the Terraform juju provider.

Since the spec is not finalized yet, the PR may miss features/decisions that are still under discussion.

Parts where we deviate from the spec

  • Omitted units from variables (inputs). This is because CKF charms have not been designed to function with more than one units.

Decisions that are still under discussion in the spec

  • outputs.tf and variables.tf are (and should be) in alphabetical order as per Terraform style guide.
  • outputs provides and requires endpoints.
  • variable channel has null as default value to replicate native juju behaviour, which also asks Charmhub about the default channel, if it's not provided. The spec leaves that up to the developers.
  • variable app_name has a default value, same as the one in juju_application.argo_controller.charm.name. This is because juju deploy native behavior uses the charm.name as the application name, if none is provided.

Additional implementation notes

  • .gitignore: I added things that didn't need to be commited. Not 100% sure this covers everything.

CI

Regarding the CI, there is a comment in the spec by Ghislain where he mentioned that "the first implementation steps for this spec will be to create shared workflows". Thus, I think we shouldn't block too much on the CI right now. I 'd prefer if we removed it completely than spend too much time reviewing it, since it will change in the future. That being said, here are the implementation details about it.

Closes #196

Referenced work

(optional) TO DO

Testing

The terraform can be used with a terraform apply like the one below, using only the arguments that are needed.

terraform apply -var "app_name=argoo" -var "channel=3.4/stable" -var "model_name=kubeflow" -var "resources={oci-image: 3}"

@orfeas-k orfeas-k marked this pull request as ready for review September 9, 2024 13:45
@orfeas-k orfeas-k requested a review from a team as a code owner September 9, 2024 13:45
Copy link

@mvlassis mvlassis left a comment

Choose a reason for hiding this comment

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

Great work!

  • Testing the linter with tox -ve tflint in the charms/argo-controller directory with no errors.
  • Running terraform init, and then terraform apply -var "channel=latest/edge" -var "model_name=kubeflow" --auto-approve on the kubeflow model creates the argo-controller application from latest/edge and goes on an idle state as expected.

charms/argo-controller/terraform/main.tf Outdated Show resolved Hide resolved
charms/argo-controller/terraform/README.md Show resolved Hide resolved
charms/argo-controller/terraform/README.md Outdated Show resolved Hide resolved
charms/argo-controller/terraform/README.md Outdated Show resolved Hide resolved
charms/argo-controller/terraform/README.md Outdated Show resolved Hide resolved
DnPlas added a commit to canonical/mlflow-operator that referenced this pull request Sep 20, 2024
* feat: add Terraform module for mlflow-server

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Fixes #266
orfeas-k added a commit to canonical/training-operator that referenced this pull request Sep 24, 2024
Create a `terraform/` directory that hosts the Terraform module for this charm. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is follows what was done in canonical/argo-operators#198.

Ref #197
DnPlas added a commit to canonical/dex-auth-operator that referenced this pull request Sep 24, 2024
* feat: add Terraform module for dex-auth

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Part of #226
orfeas-k added a commit to canonical/notebook-operators that referenced this pull request Sep 24, 2024
Create a `terraform/` directory for each of the charms that hosts their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #405
Ref #404
orfeas-k added a commit to canonical/training-operator that referenced this pull request Sep 24, 2024
Create a `terraform/` directory that hosts the Terraform module for this charm. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is follows what was done in canonical/argo-operators#198.

Ref #197
orfeas-k added a commit to canonical/katib-operators that referenced this pull request Sep 24, 2024
Create a `terraform/` directory for each of the charms that hosts their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #236 
Ref #237 
Ref #239
orfeas-k added a commit to canonical/katib-operators that referenced this pull request Sep 24, 2024
Create a `terraform/` directory for each of the charms that hosts their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #236 
Ref #237 
Ref #239
orfeas-k added a commit to canonical/notebook-operators that referenced this pull request Sep 24, 2024
Create a `terraform/` directory for each of the charms that hosts their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #405
Ref #404
DnPlas added a commit to canonical/dex-auth-operator that referenced this pull request Sep 24, 2024
* feat: add Terraform module for dex-auth

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Part of #226
orfeas-k added a commit to canonical/knative-operators that referenced this pull request Sep 24, 2024
…227)

Create a `terraform/` directory for each of the charms to host their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #224 
Ref #225 
Ref #226
DnPlas added a commit to canonical/mlflow-operator that referenced this pull request Sep 24, 2024
* feat: add Terraform module for mlflow-server

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Fixes #266
orfeas-k added a commit to canonical/knative-operators that referenced this pull request Sep 24, 2024
…227)

Create a `terraform/` directory for each of the charms to host their individual Terraform modules. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is based on what was done in canonical/argo-operators#198.

Ref #224 
Ref #225 
Ref #226
DnPlas added a commit to canonical/namespace-node-affinity-operator that referenced this pull request Sep 24, 2024
* feat: add Terraform module for namespace-node-affinity

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Part of #46
DnPlas added a commit to canonical/namespace-node-affinity-operator that referenced this pull request Sep 24, 2024
* feat: add Terraform module for namespace-node-affinity

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Part of #46
DnPlas added a commit to canonical/mlflow-operator that referenced this pull request Sep 25, 2024
* feat: add Terraform module for mlflow-server

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Fixes #266
orfeas-k added a commit that referenced this pull request Sep 27, 2024
Adds a terraform module, as designed in CC006 - Terraform modules 
organization in the Juju ecosystem spec.

Closes #196
orfeas-k added a commit to canonical/admission-webhook-operator that referenced this pull request Sep 27, 2024
Create a `terraform/` directory that hosts the Terraform module for this charm. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is follows what was done in canonical/argo-operators#198.

Ref #152
orfeas-k added a commit to canonical/admission-webhook-operator that referenced this pull request Sep 27, 2024
Create a `terraform/` directory that hosts the Terraform module for this charm. It follows the structure proposed in [this spec](https://docs.google.com/document/d/1EG71A2pJ244PQRaGVzGj7Mx2B_bzE4U_OSqx4eeVI1E/edit) and it is follows what was done in canonical/argo-operators#198.

Ref #152
DnPlas added a commit to canonical/namespace-node-affinity-operator that referenced this pull request Sep 27, 2024
* feat: add Terraform module for namespace-node-affinity

This commit adds the terraform/ directory to the root of the repository to host
the Terraform module of this charm. This follows the standard set in CC006.
For more information please also refer to canonical/argo-operators/pull/198.

Part of #46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a terraform module for argo-controller charm
5 participants