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(example): devops-stack on scaleway #1271

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Xaving
Copy link
Member

@Xaving Xaving commented Jun 11, 2024

chore(scaleway): first example

Description of the changes

Add an example to start a devops-stack on Scaleway

@Xaving Xaving requested a review from a team as a code owner June 11, 2024 14:02
@Xaving Xaving force-pushed the example-scaleway branch from 86b471c to 000dd09 Compare June 11, 2024 16:14
# INFRA + K8s PHASE
# ###########################
module "scaleway" {
source = "[email protected]:camptocamp/devops-stack-module-cluster-scaleway.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

This here should be versioned to a tag of the repository.

.gitignore Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion the documentation could be completed with more explanations like in the other examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

i can't see any README for the other example. So this one is not too bad.

Copy link
Contributor

@lentidas lentidas Jun 12, 2024

Choose a reason for hiding this comment

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

Actually there is not supposed to be a README.md but rather a documentation page like those here.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, i added the doc to the devops-stack-module-cluster-scaleway module.

```

## Usage
Get the kubeconfig file and the domain name with the following commands:
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion, it's not best practice to use this Kubeconfig file as a way to authenticate to the cluster, since these are the same values used for setting the providers in the Terraform configuration. Maybe there is a way to recover new secret and ephemeral certificates using the Scaleway CLI utility, if it exists (see the SKS example).

examples/scaleway/inputs.tfvars Outdated Show resolved Hide resolved
Comment on lines 34 to 42
helm_values = [{
traefik = {
service = {
type = "LoadBalancer"
annotations = {
"service.beta.kubernetes.io/scw-loadbalancer-id" = module.cluster.lb_id
"service.beta.kubernetes.io/scw-loadbalancer-id" = module.scaleway.lb_id
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If this a required setting for the Traefik module, maybe a new variant of that module should be created. I see that this is very similar to what was done on the SKS module.

Using the helm_values variable should be discouraged and used only for edge cases.

examples/scaleway/main.tf Show resolved Hide resolved
examples/scaleway/main.tf Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

A few notes on this file:

  • multiple modules are not using the latest versions;
  • the Thanos module should also be included like in the other examples;

Copy link
Member Author

Choose a reason for hiding this comment

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

yes agree, maybe for later version

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is the first version and it's not something that somebody is depending on, why not do it properly the first time around?

examples/scaleway/variables.tf Outdated Show resolved Hide resolved
@Xaving Xaving force-pushed the example-scaleway branch 4 times, most recently from 58269d7 to 9a2b452 Compare June 12, 2024 12:51
examples/*/.terraform
examples/*/terraform.tfstate
examples/*/terraform.tfstate.*
examples/*/.terraform.tfstate.lock.info
examples/*/*-config
examples/*/.terraform.lock.hcl

examples/*/secrets.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

This should no be here, because we add these files with a placeholder content to the examples. See here, for example.

Comment on lines +9 to +10
examples/*/terraform.tfstate*
examples/*/.terraform.lock.hcl
Copy link
Contributor

Choose a reason for hiding this comment

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

These lines are doubled and already exist in the file.

Comment on lines +11 to +16
examples/*/kubeconfig.yml
examples/*/issue.txt
examples/*/log.txt
examples/*/*.png
examples/*/*.html
examples/*/issuers.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

I think only you have this files in your folders. Should we add it to the .gitignore and include these exceptions for everybody?

chore(scaleway): first example
@Xaving Xaving force-pushed the example-scaleway branch from 9a2b452 to feceb41 Compare June 18, 2024 08:38
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.

2 participants