Allow specifying init_containers in Postgres CRD (#445)

* Add support for init_containers
This commit is contained in:
Maxim Ivanov
2019-01-29 11:08:44 +01:00
committed by Sergey Dudoladov
parent 6f6a599c90
commit 3544cc90fa
29 changed files with 71 additions and 25 deletions
@@ -51,6 +51,7 @@ type PostgresSpec struct {
Databases map[string]string `json:"databases,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
Sidecars []Sidecar `json:"sidecars,omitempty"`
InitContainers []v1.Container `json:"init_containers,omitempty"`
PodPriorityClassName string `json:"pod_priority_class_name,omitempty"`
ShmVolume *bool `json:"enableShmVolume,omitempty"`
}
@@ -1,7 +1,7 @@
// +build !ignore_autogenerated
/*
Copyright 2018 Compose, Zalando SE
Copyright 2019 Compose, Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -442,6 +442,18 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.InitContainers != nil {
in, out := &in.InitContainers, &out.InitContainers
*out = make([]corev1.Container, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ShmVolume != nil {
in, out := &in.ShmVolume, &out.ShmVolume
*out = new(bool)
**out = **in
}
return
}