Skip to content

Commit

Permalink
add master-data pvc for etcd
Browse files Browse the repository at this point in the history
  • Loading branch information
mjudeikis committed Jul 9, 2018
1 parent 08a2441 commit 1d66388
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
13 changes: 7 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ type Config struct {
NodeBootstrapKubeconfig *v1.Config

// misc control plane configurables
ServiceAccountKey *rsa.PrivateKey
SessionSecretAuth []byte
SessionSecretEnc []byte
HtPasswd []byte
ImageConfigFormat string
TunnelHostname string
ServiceAccountKey *rsa.PrivateKey
SessionSecretAuth []byte
SessionSecretEnc []byte
HtPasswd []byte
ImageConfigFormat string
TunnelHostname string
EtcdPVCStorageClassName string

// misc node configurables
SSHKey *rsa.PrivateKey
Expand Down
1 change: 1 addition & 0 deletions pkg/config/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func Generate(m *api.Manifest, c *Config) (err error) {
c.Version = versionLatest
c.ImageConfigFormat = "openshift/origin-${component}:${version}"
c.TunnelHostname = strings.Replace(m.PublicHostname, "openshift", "openshift-tunnel", 1)
c.EtcdPVCStorageClassName = "managed-premium"

selectNodeImage(m, c)

Expand Down
2 changes: 1 addition & 1 deletion pkg/helm/bindata.go

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

3 changes: 2 additions & 1 deletion pkg/helm/chart/templates/Deployment.apps/master-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ spec:
secret:
secretName: etc-etcd
- name: master-data
emptyDir: # TODO: BIG FAT WARNING, CHANGE THIS BEFORE PRODUCTION :)
persistentVolumeClaim:
claimName: master-data
13 changes: 13 additions & 0 deletions pkg/helm/chart/templates/PersitantVolumeClaims/master-etcd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
name: "master-data"
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "10Gi"
persistentVolumeReclaimPolicy: Recycle
storageClassName: {{ .Values.EtcdPVCStorageClassName | quote }}

1 change: 1 addition & 0 deletions pkg/helm/chart/templates/Secret/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ stringData:
TunnelHostname: {{ .Values.TunnelHostname | quote }}
TunnelImage: {{ .Values.TunnelImage | quote }}
WebConsoleImage: {{ .Values.WebConsoleImage | quote }}
EtcdPVCStorageClassName: {{ .Value.EtcdPVCStorageClassName | quote }}
manifest.yaml: |
ClientID: {{ .Values.ClientID | quote }}
Expand Down
3 changes: 2 additions & 1 deletion pkg/helm/data/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ ServiceAccountPrivateKey: {{ Base64Encode (PrivateKeyAsBytes .Config.ServiceAcco
ServiceAccountPublicKey: {{ Base64Encode (PublicKeyAsBytes .Config.ServiceAccountKey.PublicKey) | quote }}
SessionSecretAuth: {{ Base64Encode .Config.SessionSecretAuth | quote }}
SessionSecretEnc: {{ Base64Encode .Config.SessionSecretEnc | quote }}
HtPasswd: {{ Base64Encode .Config.HtPasswd | quote }}
HtPasswd: {{ Base64Encode .Config.HtPasswd | quote }}
EtcdPVCStorageClassName: {{ .Config.EtcdPVCStorageClassName | quote }}

# kubeconfigs
AdminKubeconfig: {{ Base64Encode (YamlMarshal .Config.AdminKubeconfig) | quote }}
Expand Down

0 comments on commit 1d66388

Please sign in to comment.