Class: Google::Apis::BinaryauthorizationV1::AdmissionRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/binaryauthorization_v1/classes.rb,
lib/google/apis/binaryauthorization_v1/representations.rb,
lib/google/apis/binaryauthorization_v1/representations.rb

Overview

An admission rule specifies either that all container images used in a pod creation request must be attested to by one or more attestors, that all pod creations will be allowed, or that all pod creations will be denied. Images matching an admission allowlist pattern are exempted from admission rules and will never block a pod creation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdmissionRule

Returns a new instance of AdmissionRule.



48
49
50
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 48

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#enforcement_modeString

Required. The action when a pod creation is denied by the admission rule. Corresponds to the JSON property enforcementMode

Returns:

  • (String)


36
37
38
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 36

def enforcement_mode
  @enforcement_mode
end

#evaluation_modeString

Required. How this admission rule will be evaluated. Corresponds to the JSON property evaluationMode

Returns:

  • (String)


41
42
43
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 41

def evaluation_mode
  @evaluation_mode
end

#require_attestations_byArray<String>

Corresponds to the JSON property requireAttestationsBy

Returns:

  • (Array<String>)


46
47
48
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 46

def require_attestations_by
  @require_attestations_by
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



53
54
55
56
57
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 53

def update!(**args)
  @enforcement_mode = args[:enforcement_mode] if args.key?(:enforcement_mode)
  @evaluation_mode = args[:evaluation_mode] if args.key?(:evaluation_mode)
  @require_attestations_by = args[:require_attestations_by] if args.key?(:require_attestations_by)
end