Commit 5529de17 authored by Guilherme Garnier's avatar Guilherme Garnier

Fix deployment name

parent b1b21639
......@@ -6,11 +6,10 @@ import (
"reflect"
"sort"
"github.com/tsuru/nginx-operator/pkg/apis/nginx/v1alpha1"
"github.com/tsuru/nginx-operator/pkg/stub/k8s"
"github.com/operator-framework/operator-sdk/pkg/sdk"
"github.com/sirupsen/logrus"
"github.com/tsuru/nginx-operator/pkg/apis/nginx/v1alpha1"
"github.com/tsuru/nginx-operator/pkg/stub/k8s"
appv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
......
......@@ -41,7 +41,7 @@ func NewDeployment(n *v1alpha1.Nginx) (*appv1.Deployment, error) {
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: n.Name + "-deployment",
Name: n.Name,
Namespace: n.Namespace,
OwnerReferences: []metav1.OwnerReference{
*metav1.NewControllerRef(n, schema.GroupVersionKind{
......@@ -199,6 +199,7 @@ func setupConfig(conf *v1alpha1.ConfigRef, dep *appv1.Deployment) {
},
})
case v1alpha1.ConfigKindInline:
// FIXME: inline content is being written out of order
if dep.Spec.Template.Annotations == nil {
dep.Spec.Template.Annotations = make(map[string]string)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment