Class: Google::Apis::RunV1::Service

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

Overview

Service acts as a top-level container that manages a set of Routes and Configurations which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets). The Service's controller will track the statuses of its owned Configuration and Route, reflecting their statuses and conditions as its own. See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md# service

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Service

Returns a new instance of Service.



2511
2512
2513
# File 'lib/google/apis/run_v1/classes.rb', line 2511

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

Instance Attribute Details

#api_versionString

The API version for this call such as "serving.knative.dev/v1". Corresponds to the JSON property apiVersion

Returns:

  • (String)


2487
2488
2489
# File 'lib/google/apis/run_v1/classes.rb', line 2487

def api_version
  @api_version
end

#kindString

The kind of resource, in this case "Service". Corresponds to the JSON property kind

Returns:

  • (String)


2492
2493
2494
# File 'lib/google/apis/run_v1/classes.rb', line 2492

def kind
  @kind
end

#metadataGoogle::Apis::RunV1::ObjectMeta

k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. Corresponds to the JSON property metadata



2498
2499
2500
# File 'lib/google/apis/run_v1/classes.rb', line 2498

def 
  @metadata
end

#specGoogle::Apis::RunV1::ServiceSpec

ServiceSpec holds the desired state of the Route (from the client), which is used to manipulate the underlying Route and Configuration(s). Corresponds to the JSON property spec



2504
2505
2506
# File 'lib/google/apis/run_v1/classes.rb', line 2504

def spec
  @spec
end

#statusGoogle::Apis::RunV1::ServiceStatus

The current state of the Service. Output only. Corresponds to the JSON property status



2509
2510
2511
# File 'lib/google/apis/run_v1/classes.rb', line 2509

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2516
2517
2518
2519
2520
2521
2522
# File 'lib/google/apis/run_v1/classes.rb', line 2516

def update!(**args)
  @api_version = args[:api_version] if args.key?(:api_version)
  @kind = args[:kind] if args.key?(:kind)
  @metadata = args[:metadata] if args.key?(:metadata)
  @spec = args[:spec] if args.key?(:spec)
  @status = args[:status] if args.key?(:status)
end