Skip to content

Commit

Permalink
Merge pull request #533 from mengqiy/webhook_client_comment
Browse files Browse the repository at this point in the history
[doc] add comments about how to use the client in webhook handler
  • Loading branch information
k8s-ci-robot authored Dec 14, 2018
2 parents 2a270c1 + 35dabc3 commit 820ca4d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/scaffold/webhook/admissionhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func init() {
// {{ .Resource.Kind }}{{ .OperationsString }}Handler handles {{ .Resource.Kind }}
type {{ .Resource.Kind }}{{ .OperationsString }}Handler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client
// Decoder decodes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func init() {

// FirstMateCreateUpdateHandler handles FirstMate
type FirstMateCreateUpdateHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client

// Decoder decodes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func init() {

// FirstMateDeleteHandler handles FirstMate
type FirstMateDeleteHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client

// Decoder decodes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func init() {

// FrigateUpdateHandler handles Frigate
type FrigateUpdateHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client

// Decoder decodes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func init() {

// KrakenCreateHandler handles Kraken
type KrakenCreateHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client

// Decoder decodes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func init() {

// NamespaceUpdateHandler handles Namespace
type NamespaceUpdateHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
// Client client.Client

// Decoder decodes objects
Expand Down

0 comments on commit 820ca4d

Please sign in to comment.