Skip to content

Commit

Permalink
try to remove network config from cloud-init
Browse files Browse the repository at this point in the history
  • Loading branch information
QcFe authored Mar 19, 2024
1 parent 610b7b4 commit 9a0ad7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions operators/pkg/forge/cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
// userdata is a helper structure to marshal the userdata configuration.
type userdata struct {
Users []user `yaml:"users"`
Network network `yaml:"network"`
Mounts [][]string `yaml:"mounts"`
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`
}
Expand All @@ -38,12 +37,6 @@ type user struct {
Shell string `yaml:"shell"`
}

// network is a helper structure to marshal the userdata configuration to configure the network subsystem.
type network struct {
Version int `yaml:"version"`
ID0 interf `yaml:"id0"`
}

// interf is a helper structure to marshal the userdata configuration to configure a given interface.
type interf struct {

Check failure on line 41 in operators/pkg/forge/cloudinit.go

View workflow job for this annotation

GitHub Actions / Lint golang files

type `interf` is unused (unused)
DHCP4 bool `yaml:"dhcp4"`
Expand All @@ -62,10 +55,6 @@ func CloudInitUserData(nfsServerName, nfsPath string, publicKeys []string) ([]by
SSHAuthorizedKeys: publicKeys,
Shell: "/bin/bash",
}},
Network: network{
Version: 2,
ID0: interf{DHCP4: true},
},
SSHAuthorizedKeys: publicKeys,
}
if nfsServerName != "" && nfsPath != "" {
Expand Down
4 changes: 0 additions & 4 deletions operators/pkg/forge/cloudinit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ users:
- tenant-key-1
- tenant-key-2
shell: /bin/bash
network:
version: 2
id0:
dhcp4: true
mounts:
- - rook-ceph-nfs-my-nfs-a.rook-ceph.svc.cluster.local:/path
- /media/mydrive
Expand Down

0 comments on commit 9a0ad7a

Please sign in to comment.