Skip to content

Commit

Permalink
Added envFrom configuration for backends
Browse files Browse the repository at this point in the history
EnvFrom can be used to add arbitrary env varibles 'in bulk' to the job container template

This feature can be useful in implementing some generic authentication

Signed-off-by: Alexander KIRILOV <aleksandar.kirilov@proxym.fr>
  • Loading branch information
Alexander KIRILOV committed May 9, 2022
1 parent b779e63 commit a9fe185
Show file tree
Hide file tree
Showing 13 changed files with 464 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type (
Backend struct {
// RepoPasswordSecretRef references a secret key to look up the restic repository password
RepoPasswordSecretRef *corev1.SecretKeySelector `json:"repoPasswordSecretRef,omitempty"`
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
Local *LocalSpec `json:"local,omitempty"`
S3 *S3Spec `json:"s3,omitempty"`
GCS *GCSSpec `json:"gcs,omitempty"`
Expand Down
7 changes: 7 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions config/crd/apiextensions.k8s.io/v1/base/k8up.io_archives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,39 @@ spec:
path:
type: string
type: object
envFrom:
items:
description: EnvFromSource represents the source of a set of
ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the ConfigMap must be defined
type: boolean
type: object
prefix:
description: An optional identifier to prepend to each key
in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret must be defined
type: boolean
type: object
type: object
type: array
gcs:
properties:
accessTokenSecretRef:
Expand Down
33 changes: 33 additions & 0 deletions config/crd/apiextensions.k8s.io/v1/base/k8up.io_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,39 @@ spec:
path:
type: string
type: object
envFrom:
items:
description: EnvFromSource represents the source of a set of
ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the ConfigMap must be defined
type: boolean
type: object
prefix:
description: An optional identifier to prepend to each key
in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret must be defined
type: boolean
type: object
type: object
type: array
gcs:
properties:
accessTokenSecretRef:
Expand Down
33 changes: 33 additions & 0 deletions config/crd/apiextensions.k8s.io/v1/base/k8up.io_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,39 @@ spec:
path:
type: string
type: object
envFrom:
items:
description: EnvFromSource represents the source of a set of
ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the ConfigMap must be defined
type: boolean
type: object
prefix:
description: An optional identifier to prepend to each key
in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret must be defined
type: boolean
type: object
type: object
type: array
gcs:
properties:
accessTokenSecretRef:
Expand Down
33 changes: 33 additions & 0 deletions config/crd/apiextensions.k8s.io/v1/base/k8up.io_prunes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,39 @@ spec:
path:
type: string
type: object
envFrom:
items:
description: EnvFromSource represents the source of a set of
ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the ConfigMap must be defined
type: boolean
type: object
prefix:
description: An optional identifier to prepend to each key
in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret must be defined
type: boolean
type: object
type: object
type: array
gcs:
properties:
accessTokenSecretRef:
Expand Down
33 changes: 33 additions & 0 deletions config/crd/apiextensions.k8s.io/v1/base/k8up.io_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,39 @@ spec:
path:
type: string
type: object
envFrom:
items:
description: EnvFromSource represents the source of a set of
ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the ConfigMap must be defined
type: boolean
type: object
prefix:
description: An optional identifier to prepend to each key
in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret must be defined
type: boolean
type: object
type: object
type: array
gcs:
properties:
accessTokenSecretRef:
Expand Down
Loading

0 comments on commit a9fe185

Please sign in to comment.