Skip to content

Commit

Permalink
Apply annotations to pods in created StatefulSets (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
robskillington authored Feb 14, 2020
1 parent fd5e604 commit 23428d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/k8sops/m3db/generators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"

crdutils "github.com/ant31/crd-validation/pkg"
"github.com/stretchr/testify/assert"
"k8s.io/utils/pointer"
)

func TestGenerateCRD(t *testing.T) {
Expand Down Expand Up @@ -139,7 +139,8 @@ func TestGenerateStatefulSet(t *testing.T) {
Replicas: instanceAmount,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: labels,
Labels: labels,
Annotations: annotations.BaseAnnotations(fixture),
},
Spec: v1.PodSpec{
PriorityClassName: "m3db-priority",
Expand Down
3 changes: 2 additions & 1 deletion pkg/k8sops/m3db/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func NewBaseStatefulSet(ssName, isolationGroup string, cluster *myspec.M3DBClust
Replicas: &ic,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: objLabels,
Labels: objLabels,
Annotations: objAnnotations,
},
Spec: v1.PodSpec{
PriorityClassName: cluster.Spec.PriorityClassName,
Expand Down

0 comments on commit 23428d7

Please sign in to comment.