Skip to content

Commit 71a6a55

Browse files
committed
change elasticsearch template_file to secret.Secret
1 parent 5679bd8 commit 71a6a55

File tree

6 files changed

+207
-5
lines changed

6 files changed

+207
-5
lines changed

charts/logging-operator/crds/logging.banzaicloud.io_clusteroutputs.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,56 @@ spec:
11771177
type: string
11781178
template_file:
11791179
description: The path to the file containing the template to install.
1180-
type: string
1180+
properties:
1181+
mountFrom:
1182+
description: Refers to a secret value to be used through a volume
1183+
mount
1184+
properties:
1185+
secretKeyRef:
1186+
description: SecretKeySelector selects a key of a Secret.
1187+
properties:
1188+
key:
1189+
description: The key of the secret to select from. Must
1190+
be a valid secret key.
1191+
type: string
1192+
name:
1193+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1194+
TODO: Add other useful fields. apiVersion, kind, uid?'
1195+
type: string
1196+
optional:
1197+
description: Specify whether the Secret or its key must
1198+
be defined
1199+
type: boolean
1200+
required:
1201+
- key
1202+
type: object
1203+
type: object
1204+
value:
1205+
description: Refers to a non-secret value
1206+
type: string
1207+
valueFrom:
1208+
description: Refers to a secret value to be used directly
1209+
properties:
1210+
secretKeyRef:
1211+
description: SecretKeySelector selects a key of a Secret.
1212+
properties:
1213+
key:
1214+
description: The key of the secret to select from. Must
1215+
be a valid secret key.
1216+
type: string
1217+
name:
1218+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1219+
TODO: Add other useful fields. apiVersion, kind, uid?'
1220+
type: string
1221+
optional:
1222+
description: Specify whether the Secret or its key must
1223+
be defined
1224+
type: boolean
1225+
required:
1226+
- key
1227+
type: object
1228+
type: object
1229+
type: object
11811230
template_name:
11821231
description: The name of the template to define. If a template by
11831232
the name given is already present, it will be left unchanged,

charts/logging-operator/crds/logging.banzaicloud.io_outputs.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,56 @@ spec:
11771177
type: string
11781178
template_file:
11791179
description: The path to the file containing the template to install.
1180-
type: string
1180+
properties:
1181+
mountFrom:
1182+
description: Refers to a secret value to be used through a volume
1183+
mount
1184+
properties:
1185+
secretKeyRef:
1186+
description: SecretKeySelector selects a key of a Secret.
1187+
properties:
1188+
key:
1189+
description: The key of the secret to select from. Must
1190+
be a valid secret key.
1191+
type: string
1192+
name:
1193+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1194+
TODO: Add other useful fields. apiVersion, kind, uid?'
1195+
type: string
1196+
optional:
1197+
description: Specify whether the Secret or its key must
1198+
be defined
1199+
type: boolean
1200+
required:
1201+
- key
1202+
type: object
1203+
type: object
1204+
value:
1205+
description: Refers to a non-secret value
1206+
type: string
1207+
valueFrom:
1208+
description: Refers to a secret value to be used directly
1209+
properties:
1210+
secretKeyRef:
1211+
description: SecretKeySelector selects a key of a Secret.
1212+
properties:
1213+
key:
1214+
description: The key of the secret to select from. Must
1215+
be a valid secret key.
1216+
type: string
1217+
name:
1218+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1219+
TODO: Add other useful fields. apiVersion, kind, uid?'
1220+
type: string
1221+
optional:
1222+
description: Specify whether the Secret or its key must
1223+
be defined
1224+
type: boolean
1225+
required:
1226+
- key
1227+
type: object
1228+
type: object
1229+
type: object
11811230
template_name:
11821231
description: The name of the template to define. If a template by
11831232
the name given is already present, it will be left unchanged,

config/crd/bases/logging.banzaicloud.io_clusteroutputs.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,56 @@ spec:
11771177
type: string
11781178
template_file:
11791179
description: The path to the file containing the template to install.
1180-
type: string
1180+
properties:
1181+
mountFrom:
1182+
description: Refers to a secret value to be used through a volume
1183+
mount
1184+
properties:
1185+
secretKeyRef:
1186+
description: SecretKeySelector selects a key of a Secret.
1187+
properties:
1188+
key:
1189+
description: The key of the secret to select from. Must
1190+
be a valid secret key.
1191+
type: string
1192+
name:
1193+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1194+
TODO: Add other useful fields. apiVersion, kind, uid?'
1195+
type: string
1196+
optional:
1197+
description: Specify whether the Secret or its key must
1198+
be defined
1199+
type: boolean
1200+
required:
1201+
- key
1202+
type: object
1203+
type: object
1204+
value:
1205+
description: Refers to a non-secret value
1206+
type: string
1207+
valueFrom:
1208+
description: Refers to a secret value to be used directly
1209+
properties:
1210+
secretKeyRef:
1211+
description: SecretKeySelector selects a key of a Secret.
1212+
properties:
1213+
key:
1214+
description: The key of the secret to select from. Must
1215+
be a valid secret key.
1216+
type: string
1217+
name:
1218+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1219+
TODO: Add other useful fields. apiVersion, kind, uid?'
1220+
type: string
1221+
optional:
1222+
description: Specify whether the Secret or its key must
1223+
be defined
1224+
type: boolean
1225+
required:
1226+
- key
1227+
type: object
1228+
type: object
1229+
type: object
11811230
template_name:
11821231
description: The name of the template to define. If a template by
11831232
the name given is already present, it will be left unchanged,

config/crd/bases/logging.banzaicloud.io_outputs.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,56 @@ spec:
11771177
type: string
11781178
template_file:
11791179
description: The path to the file containing the template to install.
1180-
type: string
1180+
properties:
1181+
mountFrom:
1182+
description: Refers to a secret value to be used through a volume
1183+
mount
1184+
properties:
1185+
secretKeyRef:
1186+
description: SecretKeySelector selects a key of a Secret.
1187+
properties:
1188+
key:
1189+
description: The key of the secret to select from. Must
1190+
be a valid secret key.
1191+
type: string
1192+
name:
1193+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1194+
TODO: Add other useful fields. apiVersion, kind, uid?'
1195+
type: string
1196+
optional:
1197+
description: Specify whether the Secret or its key must
1198+
be defined
1199+
type: boolean
1200+
required:
1201+
- key
1202+
type: object
1203+
type: object
1204+
value:
1205+
description: Refers to a non-secret value
1206+
type: string
1207+
valueFrom:
1208+
description: Refers to a secret value to be used directly
1209+
properties:
1210+
secretKeyRef:
1211+
description: SecretKeySelector selects a key of a Secret.
1212+
properties:
1213+
key:
1214+
description: The key of the secret to select from. Must
1215+
be a valid secret key.
1216+
type: string
1217+
name:
1218+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1219+
TODO: Add other useful fields. apiVersion, kind, uid?'
1220+
type: string
1221+
optional:
1222+
description: Specify whether the Secret or its key must
1223+
be defined
1224+
type: boolean
1225+
required:
1226+
- key
1227+
type: object
1228+
type: object
1229+
type: object
11811230
template_name:
11821231
description: The name of the template to define. If a template by
11831232
the name given is already present, it will be left unchanged,

pkg/sdk/model/output/elasticsearch.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ type ElasticsearchOutput struct {
106106
// The name of the template to define. If a template by the name given is already present, it will be left unchanged, unless template_overwrite is set, in which case the template will be updated.
107107
TemplateName string `json:"template_name,omitempty"`
108108
// The path to the file containing the template to install.
109-
TemplateFile string `json:"template_file,omitempty"`
109+
// +docLink:"Secret,../secret/"
110+
TemplateFile *secret.Secret `json:"template_file,omitempty"`
110111
// Specify index templates in form of hash. Can contain multiple templates.
111112
Templates string `json:"templates,omitempty"`
112113
// Specify the string and its value to be replaced in form of hash. Can contain multiple key value pair that would be replaced in the specified template_file. This setting only creates template and to add rollover index please check the rollover_index configuration.

pkg/sdk/model/output/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)