Skip to content

Commit 6afc7f2

Browse files
corneliusludmannroboquat
authored andcommitted
[installer] Tidy up omitempty in config
/werft no-preview
1 parent 63d893c commit 6afc7f2

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

install/installer/example-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ containerRegistry:
1010
inCluster: true
1111
database:
1212
inCluster: true
13-
domain: gitpod.example.com
14-
imagePullSecrets: null
13+
disableDefinitelyGp: false
14+
domain: ""
1515
jaegerOperator:
1616
inCluster: true
1717
kind: Full
@@ -21,13 +21,15 @@ objectStorage:
2121
inCluster: true
2222
observability:
2323
logLevel: info
24+
openVSX:
25+
url: https://open-vsx.org
2426
repository: eu.gcr.io/gitpod-core-dev/build
2527
workspace:
2628
resources:
2729
requests:
2830
cpu: "1"
2931
memory: 2Gi
3032
runtime:
31-
containerdRuntimeDir: /run/containerd/io.containerd.runtime.v2.task/k8s.io
33+
containerdRuntimeDir: /var/lib/containerd/io.containerd.runtime.v2.task/k8s.io
3234
containerdSocket: /run/containerd/containerd.sock
3335
fsShiftMethod: fuse

install/installer/pkg/config/v1/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ func (v version) Defaults(in interface{}) error {
5555
cfg.Workspace.Runtime.ContainerDSocket = "/run/containerd/containerd.sock"
5656
cfg.Workspace.Runtime.ContainerDRuntimeDir = "/var/lib/containerd/io.containerd.runtime.v2.task/k8s.io"
5757
cfg.OpenVSX.URL = "https://open-vsx.org"
58+
cfg.DisableDefinitelyGP = false
5859

5960
return nil
6061
}
@@ -78,7 +79,7 @@ type Config struct {
7879

7980
Certificate ObjectRef `json:"certificate" validate:"required"`
8081

81-
ImagePullSecrets []ObjectRef `json:"imagePullSecrets"`
82+
ImagePullSecrets []ObjectRef `json:"imagePullSecrets,omitempty"`
8283

8384
Workspace Workspace `json:"workspace" validate:"required"`
8485

@@ -90,7 +91,7 @@ type Config struct {
9091

9192
SSHGatewayHostKey *ObjectRef `json:"sshGatewayHostKey,omitempty"`
9293

93-
DisableDefinitelyGP bool `json:"disableDefinitelyGp,omitempty"`
94+
DisableDefinitelyGP bool `json:"disableDefinitelyGp"`
9495

9596
Experimental *experimental.Config `json:"experimental,omitempty"`
9697
}
@@ -172,7 +173,7 @@ const (
172173
type ContainerRegistry struct {
173174
InCluster *bool `json:"inCluster,omitempty" validate:"required"`
174175
External *ContainerRegistryExternal `json:"external,omitempty" validate:"required_if=InCluster false"`
175-
S3Storage *S3Storage `json:"s3storage"`
176+
S3Storage *S3Storage `json:"s3storage,omitempty"`
176177
}
177178

178179
type ContainerRegistryExternal struct {

install/installer/pkg/config/v1/experimental/experimental.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type TracingSampleType string
4040

4141
type Tracing struct {
4242
SamplerType *TracingSampleType `json:"samplerType,omitempty" validate:"omitempty,tracing_sampler_type"`
43-
SamplerParam *float64 `json:"samplerParam,omitEmpty" validate:"required_with=SamplerType"`
43+
SamplerParam *float64 `json:"samplerParam,omitempty" validate:"required_with=SamplerType"`
4444
}
4545

4646
// Values taken from https://github.com/jaegertracing/jaeger-client-go/blob/967f9c36f0fa5a2617c9a0993b03f9a3279fadc8/config/config.go#L71

0 commit comments

Comments
 (0)