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

How-To: Adopt worker nodes with the cloudscale Machine API Provider #362

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Nov 1, 2024

No description provided.

@bastjan bastjan added the documentation Improvements or additions to documentation label Nov 1, 2024
@bastjan bastjan requested a review from a team November 1, 2024 09:48
yq eval -i '.parameters.machine_api_provider_cloudscale.secrets["cloudscale-user-data"].stringData.ignitionCA = "${openshift4_terraform:terraform_variables:ignition_ca}"' \
${CLUSTER_ID}.yml

git commit -m "Allow adoption of worker nodes" "${CLUSTER_ID}.yml"
Copy link
Member

Choose a reason for hiding this comment

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

A git push appears to be missing here.

+
[source,bash]
----
terraform output -raw worker-machines_yml | yq -P > worker-machines.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

on my machine Terraform prints a warning which then gets included in the yaml (because they have never heard of stderr):

└─» terraform output -raw worker-machines_yml > foo.yml


└─» cat foo.yml 
There are some problems with the CLI configuration:
╷
│ Warning: Unable to open CLI configuration file
│
│ The CLI configuration file at "/root/.terraformrc" does not exist.
╵

"apiVersion": "v1"
"items": []
"kind": "List"

Copy link
Contributor

Choose a reason for hiding this comment

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

I ended up using this command:

terraform output -raw worker-machineset_yml | grep -vP '^(│|╵|╷|There are some problems with the CLI configuration)' | yq -P > worker-machineset.yml
head worker-machineset.yml
kubectl apply -f worker-machineset.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants