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: remove unused variable NODE_NAME #545

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Conversation

apricote
Copy link
Member

This variable is unused. It does not matter where HCCM is running, as long as it can talk to the Kubernetes & Hetzner Cloud APIs.

This variable is unused. It does not matter where HCCM is running, as
long as it can talk to the Kubernetes & Hetzner Cloud APIs.
@apricote apricote self-assigned this Oct 25, 2023
@apricote apricote requested a review from a team as a code owner October 25, 2023 05:50
@apricote apricote changed the title refactor: remove unused variable NODE_NAME feat: remove unused variable NODE_NAME Oct 25, 2023
@apricote apricote requested a review from jooola October 25, 2023 11:27
@apricote apricote merged commit a659408 into main Oct 25, 2023
8 checks passed
@apricote apricote deleted the refactor-remove-unused-var branch October 25, 2023 12:08
@mraenker
Copy link

mraenker commented Oct 29, 2023

Hello there,

I am currently following this [1] tutorial and translating it to Ansible at the same time. Running my existing (and prviously working) playbook today resulted in a error.

I noticed, when trying to deploy my sampleservice today (recreating the cluster from the ground up by creating new servers and so on) using LoadBalancer provided by the Hcloud-Plugin, I never received an External IP, nor was the Loadbalancer created in the Hetzner Cloud Console.

Issueing kubectl get pods -A revealed, the hcloud-cloud-controller-manager was never able to start from the get go of the cluster:

NAMESPACE      NAME                                               READY   STATUS             RESTARTS         AGE
...
kube-system    hcloud-cloud-controller-manager-554c64cd95-g64r9   0/1     CrashLoopBackOff   26 (3m33s ago)   112m
kube-system    hcloud-csi-controller-5868f9d75c-wj4lj             5/5     Running            0                112m
kube-system    hcloud-csi-node-7qmg8                              3/3     Running            0                110m
kube-system    hcloud-csi-node-g6c5d                              3/3     Running            0                110m
kube-system    hcloud-csi-node-mkpdc                              3/3     Running            0                112m
kube-system    hcloud-csi-node-pqrsz                              3/3     Running            0                111m
kube-system    hcloud-csi-node-qwpln                              3/3     Running            0                110m
...

Running kc logs hcloud-cloud-controller-manager-554c64cd95-g64r9 --namespace kube-system revealed this error message:

I1029 10:02:16.787608       1 serving.go:348] Generated self-signed cert in-memory
W1029 10:02:16.788250       1 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
F1029 10:02:17.524911       1 main.go:67] Cloud provider could not be initialized: could not init cloud provider "hcloud": environment variable "NODE_NAME" is required

For my viewpoint, this variable is at least flagged as "required" by main.go. This flag has to be removed there, or it is indeed required and NODE_NAME should not be removed at all. - I don't know, whats the right decision here.

/edit: Inside Ansible I am using the hcloud dynamic inventory, if that's of any concern.

(Please don't frown upon me due to this rather vague error description. I am still a newbie trying to learn Kubernetes.)

[1] https://community.hetzner.com/tutorials/install-kubernetes-cluster, but with 3 Master Nodes and 2 Worker Nodes.

Thank you for looking into this!

@apricote
Copy link
Member Author

apricote commented Nov 7, 2023

Hey @mraenker,

it looks like the tutorial uses the unstable manifest from the (now renamed) master branch for hcloud-cloud-controller-manager. The referenced container image tag in this manifest is for the last release version, which still requires the environment variable.

I would recommend you to use versioned manifests for deploying. We now also have a Helm Chart, that can make installing & upgrading easier.

apricote pushed a commit that referenced this pull request Dec 1, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.19.0-rc.0](v1.18.0...v1.19.0-rc.0)
(2023-12-01)


### Features

* **chart:** add daemonset and node selector
([#537](#537))
([a94384f](a94384f))
* **config:** stricter validation for settings
`HCLOUD_LOAD_BALANCERS_ENABLED`, `HCLOUD_METRICS_ENABLED` &
`HCLOUD_NETWORK_ROUTES_ENABLED`
([#546](#546))
([335a2c9](335a2c9))
* **helm:** remove "v" prefix from chart version
([#565](#565))
([f11aa0d](f11aa0d)),
closes
[#529](#529)
* **load-balancer:** handle planned targets exceedings max targets
([#570](#570))
([8bb131f](8bb131f))
* remove unused variable NODE_NAME
([#545](#545))
([a659408](a659408))
* **robot:** handle ratelimiting with constant backoff
([#572](#572))
([2ddc201](2ddc201))
* support for Robot servers
([#561](#561))
([65dea11](65dea11))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
apricote added a commit that referenced this pull request Dec 7, 2023
## [1.19.0](v1.18.0...v1.19.0)
(2023-12-07)


### Features

* **chart:** add daemonset and node selector
([#537](#537))
([a94384f](a94384f))
* **config:** stricter validation for settings
`HCLOUD_LOAD_BALANCERS_ENABLED`, `HCLOUD_METRICS_ENABLED` &
`HCLOUD_NETWORK_ROUTES_ENABLED`
([#546](#546))
([335a2c9](335a2c9))
* **helm:** remove "v" prefix from chart version
([#565](#565))
([f11aa0d](f11aa0d)),
closes
[#529](#529)
* **load-balancer:** handle planned targets exceedings max targets
([#570](#570))
([8bb131f](8bb131f))
* remove unused variable NODE_NAME
([#545](#545))
([a659408](a659408))
* **robot:** handle ratelimiting with constant backoff
([#572](#572))
([2ddc201](2ddc201))
* support for Robot servers
([#561](#561))
([65dea11](65dea11))
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.

None yet

3 participants