Skip to content

Commit

Permalink
chore: remove remaining NameFrom implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
metacosm committed Mar 12, 2020
1 parent cf119c6 commit 4c95728
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
4 changes: 0 additions & 4 deletions pkg/controller/component/dependent.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ func (res base) Build(empty bool) (runtime.Object, error) {
panic("implement me")
}

func (res base) NameFrom(underlying runtime.Object) string {
return framework.DefaultNameFrom(res, underlying)
}

func (res base) Fetch() (runtime.Object, error) {
return framework.DefaultFetcher(res)
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/controller/component/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ func (res pod) Build(empty bool) (runtime.Object, error) {
return nil, nil
}

func (res pod) NameFrom(underlying runtime.Object) string {
return underlying.(*corev1.Pod).Name
}

func (res pod) GetCondition(underlying runtime.Object, err error) *beta1.DependentCondition {
return framework.DefaultCustomizedGetConditionFor(res, err, underlying, func(underlying runtime.Object, cond *beta1.DependentCondition) {
p := underlying.(*corev1.Pod)
Expand Down
5 changes: 1 addition & 4 deletions pkg/controller/component/required_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"halkyon.io/api/component/v1beta1"
beta1 "halkyon.io/api/v1beta1"
framework "halkyon.io/operator-framework"
"halkyon.io/operator/pkg"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -88,10 +89,6 @@ func (res requiredCapability) Name() string {
return res.capabilityConfig.Name
}

func (res requiredCapability) NameFrom(underlying runtime.Object) string {
return underlying.(*v1beta12.Capability).Name
}

func (res requiredCapability) GetCondition(underlying runtime.Object, err error) *beta1.DependentCondition {
return framework.DefaultCustomizedGetConditionFor(res, err, underlying, func(underlying runtime.Object, cond *beta1.DependentCondition) {
c := underlying.(*v1beta12.Capability)
Expand Down
4 changes: 0 additions & 4 deletions pkg/controller/component/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,3 @@ func (res taskRun) GetCondition(underlying runtime.Object, err error) *beta1.Dep
cond.Message = fmt.Sprintf("%s is not ready", tr.Name)
})
}

func (res taskRun) NameFrom(underlying runtime.Object) string {
return underlying.(*v1alpha1.TaskRun).Name
}

0 comments on commit 4c95728

Please sign in to comment.