trying to make a more generic sidecar

This commit is contained in:
Matt Ward
2018-06-06 01:34:52 +00:00
parent 681656cbb7
commit cfcae65f4c
3 changed files with 103 additions and 4 deletions
+10
View File
@@ -61,6 +61,15 @@ type CloneDescription struct {
EndTimestamp string `json:"timestamp,omitempty"`
}
// Sidecar defines a container to be run in the same pod as the Postgres container.
type Sidecar struct {
Resources `json:"resources,omitempty"`
Name string `json:"name,omitempty"`
DockerImage string `json:"dockerImage,omitempty"`
Ports []v1.ContainerPort `json:"ports,omitempty"`
Env []v1.EnvVar `json:"env,omitempty"`
}
type UserFlags []string
// PostgresStatus contains status of the PostgreSQL cluster (running, creation failed etc.)
@@ -124,6 +133,7 @@ type PostgresSpec struct {
ClusterName string `json:"-"`
Databases map[string]string `json:"databases,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
Sidecars []Sidecar `json:"sideCars,omitempty"`
}
// PostgresqlList defines a list of PostgreSQL clusters.