-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: webhooks and add missing conversions
- Loading branch information
1 parent
805004b
commit 69cc4f7
Showing
14 changed files
with
186 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
logf "sigs.k8s.io/controller-runtime/pkg/log" | ||
) | ||
|
||
// log is for logging in this package. | ||
var enterpriselog = logf.Log.WithName("enterprise-resource") | ||
|
||
func (r *Enterprise) SetupWebhookWithManager(mgr ctrl.Manager) error { | ||
return ctrl.NewWebhookManagedBy(mgr). | ||
For(r). | ||
Complete() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"github.com/mercedes-benz/garm-operator/api/v1beta1" | ||
"sigs.k8s.io/controller-runtime/pkg/conversion" | ||
) | ||
|
||
var _ conversion.Convertible = &Image{} | ||
|
||
func (i *Image) ConvertTo(dstRaw conversion.Hub) error { | ||
return Convert_v1alpha1_Image_To_v1beta1_Image(i, dstRaw.(*v1beta1.Image), nil) | ||
} | ||
|
||
func (i *Image) ConvertFrom(dstRaw conversion.Hub) error { | ||
return Convert_v1beta1_Image_To_v1alpha1_Image(dstRaw.(*v1beta1.Image), i, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
logf "sigs.k8s.io/controller-runtime/pkg/log" | ||
) | ||
|
||
// log is for logging in this package. | ||
var organizationlog = logf.Log.WithName("organization-resource") | ||
|
||
func (r *Organization) SetupWebhookWithManager(mgr ctrl.Manager) error { | ||
return ctrl.NewWebhookManagedBy(mgr). | ||
For(r). | ||
Complete() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"github.com/mercedes-benz/garm-operator/api/v1beta1" | ||
"sigs.k8s.io/controller-runtime/pkg/conversion" | ||
) | ||
|
||
var _ conversion.Convertible = &Pool{} | ||
|
||
func (p *Pool) ConvertTo(dstRaw conversion.Hub) error { | ||
return Convert_v1alpha1_Pool_To_v1beta1_Pool(p, dstRaw.(*v1beta1.Pool), nil) | ||
} | ||
|
||
func (p *Pool) ConvertFrom(dstRaw conversion.Hub) error { | ||
return Convert_v1beta1_Pool_To_v1alpha1_Pool(dstRaw.(*v1beta1.Pool), p, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"github.com/mercedes-benz/garm-operator/api/v1beta1" | ||
"sigs.k8s.io/controller-runtime/pkg/conversion" | ||
) | ||
|
||
var _ conversion.Convertible = &Runner{} | ||
|
||
func (r *Runner) ConvertTo(dstRaw conversion.Hub) error { | ||
return Convert_v1alpha1_Runner_To_v1beta1_Runner(r, dstRaw.(*v1beta1.Runner), nil) | ||
} | ||
|
||
func (r *Runner) ConvertFrom(dstRaw conversion.Hub) error { | ||
return Convert_v1beta1_Runner_To_v1alpha1_Runner(dstRaw.(*v1beta1.Runner), r, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
logf "sigs.k8s.io/controller-runtime/pkg/log" | ||
) | ||
|
||
// log is for logging in this package. | ||
var runnerlog = logf.Log.WithName("runner-resource") | ||
|
||
func (r *Runner) SetupWebhookWithManager(mgr ctrl.Manager) error { | ||
return ctrl.NewWebhookManagedBy(mgr). | ||
For(r). | ||
Complete() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters