diff --git a/schema/p2p_schema.go b/schema/p2p_schema.go index e3147cd..20e13f7 100644 --- a/schema/p2p_schema.go +++ b/schema/p2p_schema.go @@ -62,7 +62,7 @@ func (P2PNetworkExtended) JSONSchemaOneOf() []interface{} { // VPN represents the vpn block in the Kairos configuration. type VPN struct { - Create bool `json:"vpn,omitempty" default:"true"` - Use bool `json:"use,omitempty" default:"true"` - Envs []interface{} `json:"env,omitempty"` + Create bool `json:"vpn,omitempty" default:"true"` + Use bool `json:"use,omitempty" default:"true"` + Envs interface{} `json:"env,omitempty"` } diff --git a/schema/p2p_schema_test.go b/schema/p2p_schema_test.go index 96bc9cf..8ceffdb 100644 --- a/schema/p2p_schema_test.go +++ b/schema/p2p_schema_test.go @@ -178,4 +178,22 @@ auto: Expect(config.IsValid()).To(BeTrue()) }) }) + + Context("vpn", func() { + BeforeEach(func() { + yaml = `#cloud-config +network_token: "b3RwOgogIGRoYWdlX3NpemU6IDIwOTcxNTIwCg==" +auto: + enable: true + ha: + enable: true +vpn: + env: + DCHP: "true"` + }) + + It("succeedes", func() { + Expect(config.IsValid()).To(BeTrue()) + }) + }) })