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

bakery: add kubernetes sysext helper #14

Merged
merged 1 commit into from
Jul 25, 2023
Merged

bakery: add kubernetes sysext helper #14

merged 1 commit into from
Jul 25, 2023

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Jul 20, 2023

How to use

./create_kubernetes_sysext.sh 1.27.3 kubernetes then

variant: flatcar
version: 1.0.0
storage:
  files:
    - path: /opt/extensions/kubernetes.raw
      mode: 0644
      contents:
        source: http://.../kubernetes.raw
  links:
    - path: /etc/extensions/kubernetes.raw
      hard: false
      target: /opt/extensions/kubernetes.raw

Tests

  • Tested on QEMU (simply deploy a control plane)

  • Tested on OpenStack CAPI (CAPO) with the following template diff:

+            storage:
+              files:
+                - path: /opt/extensions/kubernetes.raw
+                  mode: 0644
+                  contents:
+                    remote:
+                      url: https://storage.googleapis.com/tormath1-flatcar/kubernetes.raw
+              links:
+                - filesystem: root
+                  path: /etc/extensions/kubernetes.raw
+                  hard: false
+                  target: /opt/extensions/kubernetes.raw
             systemd:
               units:
               - name: [email protected]
@@ -106,6 +118,18 @@ spec:
     ignition:
       containerLinuxConfig:
         additionalConfig: |
+          storage:
+            files:
+              - path: /opt/extensions/kubernetes.raw
+                mode: 0644
+                contents:
+                  remote:
+                    url: https://storage.googleapis.com/tormath1-flatcar/kubernetes.raw
+            links:
+              - filesystem: root
+                path: /etc/extensions/kubernetes.raw
+                hard: false
+                target: /opt/extensions/kubernetes.raw
           systemd:
             units:
             - name: [email protected]

On the node:

$ systemd-sysext status
HIERARCHY EXTENSIONS SINCE
/opt      none       -
/usr      kubernetes Mon 2023-07-24 16:01:05 UTC

Nodes:

$  kubectl --kubeconfig=./${CLUSTER_NAME}.kubeconfig get nodes
NAME                                  STATUS   ROLES           AGE     VERSION
capi-quickstart-control-plane-c5lkk   Ready    control-plane   7m34s   v1.27.3
capi-quickstart-md-0-hdsf5            Ready    <none>          6m55s   v1.27.3
capi-quickstart-md-0-kjj9m            Ready    <none>          6m56s   v1.27.3
capi-quickstart-md-0-qdbcn            Ready    <none>          6m56s   v1.27.3
$ kubectl get kubeadmcontrolplane
NAME                            CLUSTER           INITIALIZED   API SERVER AVAILABLE   REPLICAS   READY   UPDATED   UNAVAILABLE   AGE     VERSION
capi-quickstart-control-plane   capi-quickstart   true          true                   1          1       1         0             8m53s   v1.27.2

@tormath1 tormath1 marked this pull request as draft July 20, 2023 13:29
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
@tormath1 tormath1 self-assigned this Jul 24, 2023
@tormath1 tormath1 force-pushed the tormath1/kubernetes branch from ceffc2a to 5d7d9e3 Compare July 24, 2023 15:22
@tormath1 tormath1 force-pushed the tormath1/kubernetes branch 2 times, most recently from e5d63df to 18b29d9 Compare July 24, 2023 17:19
@tormath1 tormath1 changed the title [wip] bakery: add kubernetes sysext helper bakery: add kubernetes sysext helper Jul 24, 2023
@tormath1 tormath1 marked this pull request as ready for review July 24, 2023 17:21
@tormath1 tormath1 requested a review from a team July 24, 2023 17:21
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
@tormath1 tormath1 force-pushed the tormath1/kubernetes branch from 2d5541f to 1a1073d Compare July 25, 2023 08:34
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
create_kubernetes_sysext.sh Outdated Show resolved Hide resolved
Signed-off-by: Mathieu Tortuyaux <[email protected]>
@tormath1 tormath1 force-pushed the tormath1/kubernetes branch from da95f13 to 6f90042 Compare July 25, 2023 10:25
@tormath1 tormath1 merged commit 8ebb850 into main Jul 25, 2023
@tormath1 tormath1 deleted the tormath1/kubernetes branch July 25, 2023 10:27
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