Skip to content

Commit

Permalink
packaging: write kubeadm script log for ignition
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Aug 9, 2024
1 parent ae5a234 commit a2fd6ae
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packaging/flavorgen/flavors/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ systemd:
After=containerd.service
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*`
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit`
)

func newClusterTopologyCluster(supervisorMode bool) (clusterv1.Cluster, error) {
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster-template-ignition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ spec:
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit
initConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand Down Expand Up @@ -361,6 +364,9 @@ spec:
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit
joinConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand Down
18 changes: 18 additions & 0 deletions templates/creds.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export NAMESPACE="prow-cluster"
export CLUSTER_CLASS_NAME=prow
export CONTROL_PLANE_ENDPOINT_IP=192.168.6.162
export CPI_IMAGE_K8S_VERSION=v1.29.0
export KUBERNETES_VERSION=v1.29.0
export VSPHERE_DATACENTER=SDDC-datacenter
export VSPHERE_NETWORK=sddc-cgw-network-6
export VSPHERE_PASSWORD='1yU(~!eC%3!F'
export VSPHERE_SERVER=10.2.224.4
export VSPHERE_SSH_AUTHORIZED_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFQAq+JGGkZMVgaqlMY6Gwom2YMO+Gf7YuLKX019nGVu [email protected]"
export VSPHERE_TLS_THUMBPRINT="D8:64:61:90:26:65:B8:1E:95:18:4B:68:56:D2:F7:34:FA:68:BF:2A"
export VSPHERE_USERNAME="[email protected]"

export VSPHERE_DATASTORE="WorkloadDatastore"
export VSPHERE_FOLDER="system"
export VSPHERE_RESOURCE_POOL="system"
export VSPHERE_STORAGE_POLICY=""
export VSPHERE_TEMPLATE="ubuntu-2204-kube-v1.29.0"
2 changes: 2 additions & 0 deletions test/framework/log/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (c *MachineLogCollector) CollectMachineLog(ctx context.Context, ctrlClient
"sudo", "cat", "/var/log/cloud-init.log"),
captureLogs("cloud-init-output.log",
"sudo", "cat", "/var/log/cloud-init-output.log"),
captureLogs("kubeadm-service.log",
"sudo", "cat", "/var/log/kubeadm-service.log"),
)
}

Expand Down

0 comments on commit a2fd6ae

Please sign in to comment.