Class: Google::Apis::ContainerV1::InitScript

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

Overview

InitScript provide a simply bash script to be executed on the node.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InitScript

Returns a new instance of InitScript.



4849
4850
4851
# File 'lib/google/apis/container_v1/classes.rb', line 4849

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

Instance Attribute Details

#argsArray<String>

Optional. The optional arguments line to be passed to the init script. Corresponds to the JSON property args

Returns:

  • (Array<String>)


4820
4821
4822
# File 'lib/google/apis/container_v1/classes.rb', line 4820

def args
  @args
end

#gcp_secret_manager_secret_uriString

The resource name of the secret manager secret hosting the init script. Both global and regional secrets are supported with format below: Global secret: projects/project/secrets/secret/versions/version Regional secret: projects/project/locations/location/secrets/secret/versions/version Example: projects/1234567890/secrets/script_1/versions/1. Accept version number only, not support version alias. User can't configure both gcp_secret_manager_secret_uri and gcs_uri. Corresponds to the JSON property gcpSecretManagerSecretUri

Returns:

  • (String)


4831
4832
4833
# File 'lib/google/apis/container_v1/classes.rb', line 4831

def gcp_secret_manager_secret_uri
  @gcp_secret_manager_secret_uri
end

#gcs_generationFixnum

The generation of the init script stored in Gloud Storage. This is the required field to identify the version of the init script. User can get the genetaion from gcloud storage objects describe gs://BUCKET_NAME/OBJECT_NAME -- format="value(generation)" or from the "Version history" tab of the object in the Cloud Console UI. Corresponds to the JSON property gcsGeneration

Returns:

  • (Fixnum)


4840
4841
4842
# File 'lib/google/apis/container_v1/classes.rb', line 4840

def gcs_generation
  @gcs_generation
end

#gcs_uriString

The Cloud Storage URI for storing the init script. Format: gs://BUCKET_NAME/ OBJECT_NAME The service account on the node pool must have read access to the object. User can't configure both gcs_uri and gcp_secret_manager_secret_uri. Corresponds to the JSON property gcsUri

Returns:

  • (String)


4847
4848
4849
# File 'lib/google/apis/container_v1/classes.rb', line 4847

def gcs_uri
  @gcs_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4854
4855
4856
4857
4858
4859
# File 'lib/google/apis/container_v1/classes.rb', line 4854

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @gcp_secret_manager_secret_uri = args[:gcp_secret_manager_secret_uri] if args.key?(:gcp_secret_manager_secret_uri)
  @gcs_generation = args[:gcs_generation] if args.key?(:gcs_generation)
  @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
end