Skip to content

Commit

Permalink
Replace util.GenerateFixedname with kmeta.ChildName (#43)
Browse files Browse the repository at this point in the history
* use kmeta.ChildName for adapter deployment generation

* update dependencies
  • Loading branch information
Pablo Mercado authored Mar 30, 2020
1 parent b93378f commit 5f28a3b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 305 deletions.
4 changes: 1 addition & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pkg/reconciler/sample/resources/receive_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/eventing/pkg/utils"
"knative.dev/pkg/kmeta"

"knative.dev/sample-source/pkg/apis/samples/v1alpha1"
Expand All @@ -44,7 +43,7 @@ func MakeReceiveAdapter(args *ReceiveAdapterArgs) *v1.Deployment {
return &v1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Namespace: args.Source.Namespace,
Name: utils.GenerateFixedName(args.Source, fmt.Sprintf("samplesource-%s", args.Source.Name)),
Name: kmeta.ChildName(fmt.Sprintf("samplesource-%s-", args.Source.Name), string(args.Source.GetUID())),
Labels: args.Labels,
OwnerReferences: []metav1.OwnerReference{
*kmeta.NewControllerRef(args.Source),
Expand Down
92 changes: 0 additions & 92 deletions vendor/knative.dev/eventing/pkg/utils/context.go

This file was deleted.

73 changes: 0 additions & 73 deletions vendor/knative.dev/eventing/pkg/utils/secret.go

This file was deleted.

135 changes: 0 additions & 135 deletions vendor/knative.dev/eventing/pkg/utils/utils.go

This file was deleted.

0 comments on commit 5f28a3b

Please sign in to comment.