kubectlv20

package module
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

README

Asset with KubeCtl v1.20

---


This library is currently under development. Do not use!

This module exports a single class called KubectlAsset which is an s3_assets.Asset that bundles the kubectl and the helm command line.

  • Helm Version: 3.8.1
  • Kubectl Version: 1.20.0

Usage:

// KubectlAsset bundles the 'kubectl' and 'helm' command lines
import { KubectlAsset } from '@aws-cdk/asset-kubectl-v20';
import * as lambda from 'aws-cdk-lib/aws-lambda';

declare const fn: lambda.Function;
const kubectl = new KubectlAsset(this, 'KubectlAsset');
fn.addLayers(new lambda.LayerVersion(this, 'KubectlLayer', {
  code: lambda.Code.fromBucket(kubectl.bucket, kubectl.s3ObjectKey),
}));

kubectl will be installed under /opt/kubectl/kubectl, and helm will be installed under /opt/helm/helm.

Documentation

Overview

An Asset construct that contains kubectl, for use in Lambda Layers

An Asset construct that contains kubectl, for use in Lambda Layers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubectlAsset_IsConstruct

func KubectlAsset_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func NewKubectlAsset_Override

func NewKubectlAsset_Override(k KubectlAsset, scope constructs.Construct, id *string, options *awss3assets.AssetOptions)

Types

type KubectlAsset

type KubectlAsset interface {
	awss3assets.Asset
	// A hash of this asset, which is available at construction time.
	//
	// As this is a plain string, it
	// can be used in construct IDs in order to enforce creation of a new resource when the content
	// hash has changed.
	AssetHash() *string
	// The path to the asset, relative to the current Cloud Assembly.
	//
	// If asset staging is disabled, this will just be the original path.
	// If asset staging is enabled it will be the staged path.
	AssetPath() *string
	// The S3 bucket in which this asset resides.
	Bucket() awss3.IBucket
	// Attribute which represents the S3 HTTP URL of this asset.
	//
	// Example:
	//   https://s3.us-west-1.amazonaws.com/bucket/key
	//
	HttpUrl() *string
	// Indicates if this asset is a single file.
	//
	// Allows constructs to ensure that the
	// correct file type was used.
	IsFile() *bool
	// Indicates if this asset is a zip archive.
	//
	// Allows constructs to ensure that the
	// correct file type was used.
	IsZipArchive() *bool
	// The tree node.
	Node() constructs.Node
	// Attribute that represents the name of the bucket this asset exists in.
	S3BucketName() *string
	// Attribute which represents the S3 object key of this asset.
	S3ObjectKey() *string
	// Attribute which represents the S3 URL of this asset.
	//
	// Example:
	//   s3://bucket/key
	//
	S3ObjectUrl() *string
	// Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset.
	//
	// This can be used by tools such as SAM CLI to provide local
	// experience such as local invocation and debugging of Lambda functions.
	//
	// Asset metadata will only be included if the stack is synthesized with the
	// "aws:cdk:enable-asset-metadata" context key defined, which is the default
	// behavior when synthesizing via the CDK Toolkit.
	// See: https://github.com/aws/aws-cdk/issues/1432
	//
	AddResourceMetadata(resource awscdk.CfnResource, resourceProperty *string)
	// Grants read permissions to the principal on the assets bucket.
	GrantRead(grantee awsiam.IGrantable)
	// Returns a string representation of this construct.
	ToString() *string
}

A CDK Asset construct that contains `kubectl` and `helm`.

func NewKubectlAsset

func NewKubectlAsset(scope constructs.Construct, id *string, options *awss3assets.AssetOptions) KubectlAsset

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL