add comments where inherited annotations could be added
This commit is contained in:
parent
2b5382edf3
commit
c4b1d69ef9
|
|
@ -284,8 +284,9 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
|
||||||
|
|
||||||
podTemplate := &v1.PodTemplateSpec{
|
podTemplate := &v1.PodTemplateSpec{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Labels: c.connectionPoolerLabels(role, true).MatchLabels,
|
Labels: c.connectionPoolerLabels(role, true).MatchLabels,
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
|
// Annotations: c.annotationsSet(c.generatePodAnnotations(spec)),
|
||||||
Annotations: c.generatePodAnnotations(spec),
|
Annotations: c.generatePodAnnotations(spec),
|
||||||
},
|
},
|
||||||
Spec: v1.PodSpec{
|
Spec: v1.PodSpec{
|
||||||
|
|
@ -336,9 +337,10 @@ func (c *Cluster) generateConnectionPoolerDeployment(connectionPooler *Connectio
|
||||||
|
|
||||||
deployment := &appsv1.Deployment{
|
deployment := &appsv1.Deployment{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: connectionPooler.Name,
|
Name: connectionPooler.Name,
|
||||||
Namespace: connectionPooler.Namespace,
|
Namespace: connectionPooler.Namespace,
|
||||||
Labels: c.connectionPoolerLabels(connectionPooler.Role, true).MatchLabels,
|
Labels: c.connectionPoolerLabels(connectionPooler.Role, true).MatchLabels,
|
||||||
|
// Annotations: c.annotationsSet(map[string]string{}),
|
||||||
Annotations: map[string]string{},
|
Annotations: map[string]string{},
|
||||||
// make StatefulSet object its owner to represent the dependency.
|
// make StatefulSet object its owner to represent the dependency.
|
||||||
// By itself StatefulSet is being deleted with "Orphaned"
|
// By itself StatefulSet is being deleted with "Orphaned"
|
||||||
|
|
@ -387,9 +389,11 @@ func (c *Cluster) generateConnectionPoolerService(connectionPooler *ConnectionPo
|
||||||
|
|
||||||
service := &v1.Service{
|
service := &v1.Service{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: connectionPooler.Name,
|
Name: connectionPooler.Name,
|
||||||
Namespace: connectionPooler.Namespace,
|
Namespace: connectionPooler.Namespace,
|
||||||
Labels: c.connectionPoolerLabels(connectionPooler.Role, false).MatchLabels,
|
Labels: c.connectionPoolerLabels(connectionPooler.Role, false).MatchLabels,
|
||||||
|
// TODO add generateServiceAnnotations?
|
||||||
|
// TODO c.annotationsSet(map[string]string{})
|
||||||
Annotations: map[string]string{},
|
Annotations: map[string]string{},
|
||||||
// make StatefulSet object its owner to represent the dependency.
|
// make StatefulSet object its owner to represent the dependency.
|
||||||
// By itself StatefulSet is being deleted with "Orphaned"
|
// By itself StatefulSet is being deleted with "Orphaned"
|
||||||
|
|
|
||||||
|
|
@ -1180,6 +1180,7 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef
|
||||||
podTemplate, err = c.generatePodTemplate(
|
podTemplate, err = c.generatePodTemplate(
|
||||||
c.Namespace,
|
c.Namespace,
|
||||||
c.labelsSet(true),
|
c.labelsSet(true),
|
||||||
|
// TODO c.annotationsSet(annotations),
|
||||||
annotations,
|
annotations,
|
||||||
spiloContainer,
|
spiloContainer,
|
||||||
initContainers,
|
initContainers,
|
||||||
|
|
@ -1231,9 +1232,10 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef
|
||||||
|
|
||||||
statefulSet := &appsv1.StatefulSet{
|
statefulSet := &appsv1.StatefulSet{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: c.statefulSetName(),
|
Name: c.statefulSetName(),
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Labels: c.labelsSet(true),
|
Labels: c.labelsSet(true),
|
||||||
|
// TODO Annotations: c.annotationsSet(c.AnnotationsToPropagate(annotations)),
|
||||||
Annotations: c.AnnotationsToPropagate(annotations),
|
Annotations: c.AnnotationsToPropagate(annotations),
|
||||||
},
|
},
|
||||||
Spec: appsv1.StatefulSetSpec{
|
Spec: appsv1.StatefulSetSpec{
|
||||||
|
|
@ -1530,6 +1532,7 @@ func (c *Cluster) generateSingleUserSecret(namespace string, pgUser spec.PgUser)
|
||||||
Name: c.credentialSecretName(username),
|
Name: c.credentialSecretName(username),
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Labels: c.labelsSet(true),
|
Labels: c.labelsSet(true),
|
||||||
|
// TODO Annotations: c.annotationsSet(map[string]string{}),
|
||||||
},
|
},
|
||||||
Type: v1.SecretTypeOpaque,
|
Type: v1.SecretTypeOpaque,
|
||||||
Data: map[string][]byte{
|
Data: map[string][]byte{
|
||||||
|
|
@ -1600,9 +1603,10 @@ func (c *Cluster) generateService(role PostgresRole, spec *acidv1.PostgresSpec)
|
||||||
|
|
||||||
service := &v1.Service{
|
service := &v1.Service{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: c.serviceName(role),
|
Name: c.serviceName(role),
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Labels: c.roleLabelsSet(true, role),
|
Labels: c.roleLabelsSet(true, role),
|
||||||
|
// TODO Annotations: c.annotationsSet(c.generateServiceAnnotations(role, spec)),
|
||||||
Annotations: c.generateServiceAnnotations(role, spec),
|
Annotations: c.generateServiceAnnotations(role, spec),
|
||||||
},
|
},
|
||||||
Spec: serviceSpec,
|
Spec: serviceSpec,
|
||||||
|
|
@ -1653,6 +1657,7 @@ func (c *Cluster) generateEndpoint(role PostgresRole, subsets []v1.EndpointSubse
|
||||||
Name: c.endpointName(role),
|
Name: c.endpointName(role),
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Labels: c.roleLabelsSet(true, role),
|
Labels: c.roleLabelsSet(true, role),
|
||||||
|
// TODO Annotations: c.annotationsSet(map[string]string{}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if len(subsets) > 0 {
|
if len(subsets) > 0 {
|
||||||
|
|
@ -1809,6 +1814,7 @@ func (c *Cluster) generatePodDisruptionBudget() *policybeta1.PodDisruptionBudget
|
||||||
Name: c.podDisruptionBudgetName(),
|
Name: c.podDisruptionBudgetName(),
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Labels: c.labelsSet(true),
|
Labels: c.labelsSet(true),
|
||||||
|
// TODO Annotations: c.annotationsSet(map[string]string{}),
|
||||||
},
|
},
|
||||||
Spec: policybeta1.PodDisruptionBudgetSpec{
|
Spec: policybeta1.PodDisruptionBudgetSpec{
|
||||||
MinAvailable: &minAvailable,
|
MinAvailable: &minAvailable,
|
||||||
|
|
@ -1931,6 +1937,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1beta1.CronJob, error) {
|
||||||
Name: c.getLogicalBackupJobName(),
|
Name: c.getLogicalBackupJobName(),
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Labels: c.labelsSet(true),
|
Labels: c.labelsSet(true),
|
||||||
|
// TODO Annotations: c.annotationsSet(map[string]string{}),
|
||||||
},
|
},
|
||||||
Spec: batchv1beta1.CronJobSpec{
|
Spec: batchv1beta1.CronJobSpec{
|
||||||
Schedule: schedule,
|
Schedule: schedule,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue