From 9cbd40f57c173b705de3105f5d69c8c43e304ba7 Mon Sep 17 00:00:00 2001 From: taemon1337 Date: Mon, 10 Sep 2018 08:38:24 -0400 Subject: [PATCH 1/2] Add ability to customize etcd operator repository Will also need to add to type VaultServiceSpec.EtcdRepository in https://github.com/coreos/vault-operator/blob/master/pkg/apis/vault/v1alpha1/types.go#53 --- pkg/util/k8sutil/vault.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index 44c6cb8..fc2c509 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -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 } From 3f6801560c0a475850cd441e1e59f5d50cd9f22c Mon Sep 17 00:00:00 2001 From: taemon1337 Date: Mon, 10 Sep 2018 10:48:53 -0400 Subject: [PATCH 2/2] added custom etcd repository override --- pkg/apis/vault/v1alpha1/types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/apis/vault/v1alpha1/types.go b/pkg/apis/vault/v1alpha1/types.go index 87128b7..bed0ae2 100644 --- a/pkg/apis/vault/v1alpha1/types.go +++ b/pkg/apis/vault/v1alpha1/types.go @@ -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"`