MCPcopy Index your code
hub / github.com/cloudnative-pg/cloudnative-pg / AdmittableObject

Interface AdmittableObject

internal/webhook/guard/guard.go:41–54  ·  view source on GitHub ↗

AdmittableObject represents a Kubernetes object that can be admitted through the guard admission control process, allowing admission errors to be set.

Source from the content-addressed store, hash-verified

39// AdmittableObject represents a Kubernetes object that can be admitted through
40// the guard admission control process, allowing admission errors to be set.
41type AdmittableObject interface {
42 client.Object
43
44 // SetAdmissionError records the admission validation error on the status,
45 // or clears it when msg is empty.
46 SetAdmissionError(msg string)
47
48 // GetAdmissionError returns the admission validation error currently
49 // recorded on the status, when the guard is responsible for clearing it.
50 // Types whose admission error is cleared by their own reconciler (for
51 // example through the phase machinery) return an empty string, so the
52 // guard does not race that logic by persisting the clear itself.
53 GetAdmissionError() string
54}
55
56// Admission provides admission control capabilities by wrapping defaulting
57// and validation webhooks for use in controller reconciliation loops.

Callers 6

ensureResourceIsValidMethod · 0.65
ensureResourceIsValidMethod · 0.65

Implementers 6

mockAdmittableObjectinternal/webhook/guard/guard_test.go
Clusterapi/v1/cluster_types.go
Backupapi/v1/backup_types.go
Databaseapi/v1/database_types.go
Poolerapi/v1/pooler_types.go
ScheduledBackupapi/v1/scheduledbackup_types.go

Calls

no outgoing calls

Tested by

no test coverage detected