REST Resource: projects.locations.fleetPackages

Resource: FleetPackage

A FleetPackage resource in the Config Delivery API.

A FleetPackage defines a package through which kubernetes configuration is deployed to a fleet of kubernetes clusters.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "resourceBundleSelector": {
    object (ResourceBundleSelector)
  },
  "target": {
    object (Target)
  },
  "rolloutStrategy": {
    object (RolloutStrategy)
  },
  "variantSelector": {
    object (VariantSelector)
  },
  "info": {
    object (FleetPackageInfo)
  },
  "deletionPropagationPolicy": enum (DeletionPropagationPolicy),
  "state": enum (State)
}
Fields
name

string

Identifier. Name of the FleetPackage. Format is projects/{project}/locations/{location}/fleetPackages/{fleetPackage}. The fleetPackage component must match [a-z][a-z0-9\-]{0,62}

createTime

string (Timestamp format)

Output only. Time at which the FleetPackage was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Most recent time at which the FleetPackage was updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. Labels are attributes that can be set and used by both the user and by Config Delivery. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

Both keys and values are additionally constrained to be <= 128 bytes.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

resourceBundleSelector

object (ResourceBundleSelector)

Required. Information specifying the source of kubernetes configuration to deploy.

target

object (Target)

Optional. Configuration to select target clusters to deploy kubernetes configuration to.

rolloutStrategy

object (RolloutStrategy)

Optional. The strategy to use to deploy kubetnetes configuration to clusters.

variantSelector

object (VariantSelector)

Required. Information specifying how to map a ResourceBundle variant to a target cluster.

info

object (FleetPackageInfo)

Output only. Information containing the rollout status of the FleetPackage across all the target clusters.

deletionPropagationPolicy

enum (DeletionPropagationPolicy)

Optional. Information around how to handle kubernetes resources at the target clusters when the FleetPackage is deleted.

state

enum (State)

Optional. The desired state of the fleet package.

ResourceBundleSelector

Information specifying the source of kubernetes configuration to deploy.

JSON representation
{

  // Union field source can be only one of the following:
  "resourceBundle": {
    object (ResourceBundleTag)
  },
  "cloudBuildRepository": {
    object (CloudBuildRepository)
  }
  // End of list of possible types for union field source.
}
Fields
Union field source. source can be a directly pushed ResourceBundle or CloudBuildRepository containing the kubernetes configuration. source can be only one of the following:
resourceBundle

object (ResourceBundleTag)

Information specifying ResourceBundle.

cloudBuildRepository

object (CloudBuildRepository)

Information specifying CloudBuildRepository.

ResourceBundleTag

ResourceBundleTag contains the information to refer to a release for a ResourceBundle.

JSON representation
{
  "name": string,
  "tag": string
}
Fields
name

string

Required. Name of the ResourceBundle. Format is projects/{p}/locations/{l}/resourceBundles/{r}.

tag

string

Required. Tag refers to a version of the release in a ResourceBundle.

CloudBuildRepository

CloudBuildRepository contains information about fetching Kubernetes configuration from a CloudBuildRepository.

JSON representation
{
  "name": string,
  "path": string,
  "tag": string,
  "serviceAccount": string,

  // Union field variants can be only one of the following:
  "variantsPattern": string
  // End of list of possible types for union field variants.
}
Fields
name

string

Required. Name of the cloud build repository. Format is projects/{p}/locations/{l}/connections/{c}/repositories/{r}.

path

string

Optional. path to the directory or file within the repository that contains the kubernetes configuration. If unspecified, path is assumed to the top level root directory of the repository.

tag

string

Required. git tag of the underlying git repository. The git tag must be in the semantic version format vX.Y.Z.

serviceAccount

string

Required. Google service account to use in CloudBuild triggers to fetch and store kubernetes configuration.

Union field variants. variants_pattern is the configuration for how to read the repository to find variants. variants can be only one of the following:
variantsPattern

string

Optional. variantsPattern is a glob pattern that will be used to find variants in the repository. Examples: "variants/*.yaml", "us-*"

Target

The target defines different ways to target set of kubernetes clusters.

JSON representation
{

  // Union field target can be only one of the following:
  "fleet": {
    object (Fleet)
  }
  // End of list of possible types for union field target.
}
Fields

Union field target.

target can be only one of the following:

fleet

object (Fleet)

The GKE fleet information.

Fleet

The fleet where the FleetPackage should be deployed.

JSON representation
{
  "project": string,
  "selector": {
    object (LabelSelector)
  }
}
Fields
project

string

Required. The host project for the GKE fleet. Format is projects/{project}.

selector

object (LabelSelector)

Optional. selector allows targeting a subset of fleet members using their labels.

LabelSelector

A label selector is a label query over a set of resources. An empty label selector matches all objects.

JSON representation
{
  "matchLabels": {
    string: string,
    ...
  }
}
Fields
matchLabels

map (key: string, value: string)

Optional. matchLabels is a map of {key,value} pairs. Each {key,value} pair must match an existing label key and value exactly in order to satisfy the match.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

VariantSelector

VariantSelector contains information for selecting a variant in ResourceBundle to deploy to a target cluster.

JSON representation
{

  // Union field strategy can be only one of the following:
  "variantNameTemplate": string
  // End of list of possible types for union field strategy.
}
Fields

Union field strategy.

strategy can be only one of the following:

variantNameTemplate

string

Required. variantNameTemplate is a template that can refer to variables containing cluster membership metadata such as location, name, and labels to generate the name of the variant for a target cluster. The variable syntax is similar to the unix shell variables.

Available variables are ${membership.name}, ${membership.location, ${membership.project} and ${membership.labels['label_name']}.

If you want to deploy a specific variant, say "default" to all the clusters, you can use "default" (string without any variables) as the variantNameTemplate.

FleetPackageInfo

FleetPackageInfo represents the status of the FleetPackage across all the target clusters.

JSON representation
{
  "activeRollout": string,
  "lastCompletedRollout": string,
  "state": enum (State),
  "errors": [
    {
      object (FleetPackageError)
    }
  ]
}
Fields
activeRollout

string

Optional. The active rollout, if any. Format is projects/{project}/locations/{location}/fleetPackages/{fleetPackage}/rollouts/{rollout}.

lastCompletedRollout

string

Optional. The last completed rollout, if any. Format is projects/{project}/locations/{location}/fleetPackages/{fleetPackage}/rollouts/{rollout}.

state

enum (State)

Optional. Output only. The current state of the FleetPackage.

errors[]

object (FleetPackageError)

Optional. Output only. Errors encountered during configuration deployment (if any).

State

Possible values for the FleetPackage state.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE FleetPackage is active.
SUSPENDED FleetPackage is suspended.
FAILED FleetPackage has failed to reconcile.
DELETING FleetPackage is being deleted.

FleetPackageError

Information representing an error encountered during rolling out configurations.

JSON representation
{
  "errorMessage": string
}
Fields
errorMessage

string

Optional. A description of the error.

State

State indicates the desired state for the fleet package. Unspecified value is equivalent to ACTIVE. If state is set to SUSPENDED, active rollout (if any) will continue but no new rollouts will be scheduled.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE FleetPackage is intended to be active.
SUSPENDED FleetPackage is intended to be suspended.

Methods

create

Creates a new FleetPackage in a given project and location.

delete

Deletes a single FleetPackage.

get

Gets details of a single FleetPackage.

list

Lists FleetPackages in a given project and location.

patch

Updates the parameters of a single FleetPackage.