Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

add custom etcd image to vault-service CRD #343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/apis/vault/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ type VaultServiceSpec struct {

// Base image to use for a Vault deployment.
BaseImage string `json:"baseImage"`

// custom etcd image to use instead of 'quay.io/coreos/etcd'
EtcdRepository string `json: "etcdRepository"`

// Version of Vault to be deployed.
Version string `json:"version"`
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/k8sutil/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func DeployEtcdCluster(etcdCRCli etcdCRClient.Interface, v *api.VaultService) er
},
},
}

// Allow custom etcd image to be used in cases where default quay.io/coreos/etcd is not usable.
if v.Spec.EtcdRepository != nil {
etcdCluster.Spec.Repository = v.Spec.EtcdRepository
}

if v.Spec.Pod != nil {
etcdCluster.Spec.Pod.Resources = v.Spec.Pod.Resources
}
Expand Down