From 906af99f497b3416bbe2fe8f5707b157e0da0497 Mon Sep 17 00:00:00 2001 From: Peter Braun Date: Wed, 28 Aug 2019 17:23:19 +0200 Subject: [PATCH] dont add empty fields to the configmap --- .../v1alpha1/grafanadatasource_types.go | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pkg/apis/integreatly/v1alpha1/grafanadatasource_types.go b/pkg/apis/integreatly/v1alpha1/grafanadatasource_types.go index 0aa41c430..c0f1ff54e 100644 --- a/pkg/apis/integreatly/v1alpha1/grafanadatasource_types.go +++ b/pkg/apis/integreatly/v1alpha1/grafanadatasource_types.go @@ -70,41 +70,41 @@ type GrafanaDataSourceFields struct { // The most common json options // See https://grafana.com/docs/administration/provisioning/#datasources type GrafanaDataSourceJsonData struct { - TlsAuth bool `json:"tlsAuth"` - TlsAuthWithCACert bool `json:"tlsAuthWithCACert"` - TlsSkipVerify bool `json:"tlsSkipVerify"` - GraphiteVersion string `json:"graphiteVersion"` - TimeInterval string `json:"timeInterval"` - EsVersion int `json:"esVersion"` - TimeField string `json:"timeField"` - Interval string `json:"interval"` - LogMessageField string `json:"logMessageField"` - LogLevelField string `json:"logLevelField"` - AuthType string `json:"authType"` - AssumeRoleArn string `json:"assumeRoleArn"` - DefaultRegion string `json:"defaultRegion"` - CustomMetricsNamespaces string `json:"customMetricsNamespaces"` - TsdbVersion string `json:"tsdbVersion"` - TsdbResolution string `json:"tsdbResolution"` - Sslmode string `json:"sslmode"` - Encrypt string `json:"encrypt"` - PostgresVersion int `json:"postgresVersion"` - Timescaledb bool `json:"timescaledb"` - MaxOpenConns int `json:"maxOpenConns"` - MaxIdleConns int `json:"maxIdleConns"` - ConnMaxLifetime int `json:"connMaxLifetime"` + TlsAuth bool `json:"tlsAuth,omitempty"` + TlsAuthWithCACert bool `json:"tlsAuthWithCACert,omitempty"` + TlsSkipVerify bool `json:"tlsSkipVerify,omitempty"` + GraphiteVersion string `json:"graphiteVersion,omitempty"` + TimeInterval string `json:"timeInterval,omitempty"` + EsVersion int `json:"esVersion,omitempty"` + TimeField string `json:"timeField,omitempty"` + Interval string `json:"interval,omitempty"` + LogMessageField string `json:"logMessageField,omitempty"` + LogLevelField string `json:"logLevelField,omitempty"` + AuthType string `json:"authType,omitempty"` + AssumeRoleArn string `json:"assumeRoleArn,omitempty"` + DefaultRegion string `json:"defaultRegion,omitempty"` + CustomMetricsNamespaces string `json:"customMetricsNamespaces,omitempty"` + TsdbVersion string `json:"tsdbVersion,omitempty"` + TsdbResolution string `json:"tsdbResolution,omitempty"` + Sslmode string `json:"sslmode,omitempty"` + Encrypt string `json:"encrypt,omitempty"` + PostgresVersion int `json:"postgresVersion,omitempty"` + Timescaledb bool `json:"timescaledb,omitempty"` + MaxOpenConns int `json:"maxOpenConns,omitempty"` + MaxIdleConns int `json:"maxIdleConns,omitempty"` + ConnMaxLifetime int `json:"connMaxLifetime,omitempty"` } // The most common secure json options // See https://grafana.com/docs/administration/provisioning/#datasources type GrafanaDataSourceSecureJsonData struct { - TlsCaCert string `json:"tlsCACert"` - TlsClientCert string `json:"tlsClientCert"` - TlsClientKey string `json:"tlsClientKey"` - Password string `json:"password"` - BasicAuthPassword string `json:"basicAuthPassword"` - AccessKey string `json:"accessKey"` - SecretKey string `json:"secretKey"` + TlsCaCert string `json:"tlsCACert,omitempty"` + TlsClientCert string `json:"tlsClientCert,omitempty"` + TlsClientKey string `json:"tlsClientKey,omitempty"` + Password string `json:"password,omitempty"` + BasicAuthPassword string `json:"basicAuthPassword,omitempty"` + AccessKey string `json:"accessKey,omitempty"` + SecretKey string `json:"secretKey,omitempty"` } func init() {