Comments (7)
I'd suggest trying with "'\\--tls-san ${var.my_cluster_domain}'"
I got a similar problem where the first global flag was ignored for some obscure reason ( the first hyphen was not read by the k3s-agent command) and adding the quotes and escaping the first hyphen fixed it.
from terraform-module-k3s.
@xunleii Thanks for the reply
I did try with v1.20.14+k3s2
and v1.21.9+k3s
and experienced the same issue. I've been poking at the cert generation code and don't see any glaring issues, will continue to poke as best I can. Thanks for taking a peek!
from terraform-module-k3s.
Hi @rdlaitila, thanks for your question.
I didn't used it with the last release on k3s; if it possible, could you test it with v1.21.x ? Something probably changed since the last time I used it.
EDIT: I didn't have time this week to test it, but I will try to check this issue this weekend
from terraform-module-k3s.
This is a real issue, for me specifying:
global_flags = [
"--tls-san ${var.my_cluster_ip}"
]
results in the first hyphen to be removed as checking the journalctl -u k3s-agent.service -n 100
results in:
...
Incorrect Usage: flag provided but not defined: -tls-san
This is super weird, I checked the code in the repo, even "logged" out some commands but couldn't find the reason why it would just remove one -
just like that.
Super weird, if it wouldn't be for this issue I probably would've gone crazy.
Thank you @Meallia, your workaround works great but this should really get fixed.
from terraform-module-k3s.
This is super weird, I checked the code in the repo, even "logged" out some commands but couldn't find the reason why it would just remove one
-
just like that.
I also checked the code and I'm rather confident the issue is not related to this repo but comes from some strange interaction between k3s and systemd.
I think this is the issue that made me try this workaround : k3s-io/k3s#1125
from terraform-module-k3s.
Sorry for this long absence, I didn't have much time these last months.
Thanks @Meallia for your workaround. I will create a PR to add it.
EDIT: after reading k3s-io/k3s#1125 (comment), adding \
before the flag seems to ignore the flag. Also, I have tried on my end with an Ubuntu 20.04 but I can't seem to reproduce this issue. What OS are you using to host k3s ?
Another weird thing is that only the first global_flags
is ignored, but was not the first flag in the systemd
service (--node-ip
should be the first one). I will do testing to see if it could be related to Terraform and how this module uses HCL. If you encounter this problem again, can you provide me the OS of the k3s host, the module version and your Terraform version ? Thanks for your help
from terraform-module-k3s.
Further to my last reply, I am closing this file.
Please do not hesitate to reopen it if you encounter this problem again.
from terraform-module-k3s.
Related Issues (20)
- Error: Invalid Attribute Value Match HOT 4
- Generated kubeconfig cannot be used (certificate signed by unknown authority) HOT 3
- Deprecated attribute with Terraform 1.3.7 HOT 1
- API URL broken in build script when using dual stack configs HOT 4
- hcloud-k3s doesnt work with v3.3.0 HOT 1
- K3s Cluster Node(s) Upgrade HOT 8
- Consider Integration Testing with k3d HOT 5
- cdktf compatibility HOT 2
- Error "Variable `name` is deprecated" HOT 1
- terraform destroy gets stuck while draining the last node HOT 3
- Taking a node out of the configuration keeps the node within the cluster but cordoned HOT 8
- 🚧 Refresh this repository
- Refresh kubeconfig when terraform state is lost HOT 3
- When generate_ca_certificates = false, module does not export any kubeconfig HOT 3
- Custom k3s cluster name inside of the admin kubeconfig HOT 2
- :bug: Cannot scale up server nodes HOT 3
- Support for K3S AirGap deployments HOT 2
- Servers must have an odd number of nodes HOT 1
- Unable to use on Windows Terraform HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-module-k3s.