env

package
v1.3.26 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 1 Imported by: 3

README

System environment variables

The package contains system environment variables - globally defined names that include AIS_ENDPOINT, AIS_AUTHN_TOKEN_FILE, and more.

As such, the env package is, effectively, part of the API: the names defined here are used throughout, both in the Go code and in the scripts. In particular, deployment scripts.

It is important to preserve consistency and reference the same names (without copy-paste duplication, when possible)

  • ais.go: AIS environment
  • authn.go: AuthN environment

See also

Documentation

Overview

Package env contains environment variables

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package env contains environment variables

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package env contains environment variables

  • Copyright (c) 2024-2025, NVIDIA CORPORATION. All rights reserved.

Package env contains environment variables

  • Copyright (c) 2024-2025, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	AisEndpoint  = "AIS_ENDPOINT" // the way to designate primary when cluster's starting up
	AisPrimaryEP = "AIS_PRIMARY_EP"

	// networking: two CIDR masks
	// 1. differentiate local (same CIDR) clients for faster HTTP redirect
	// 2. at node startup: when present with multiple choices, select one matching local unicast IP
	//    to use it as node's public interface
	AisLocalRedirectCIDR = "AIS_CLUSTER_CIDR"
	AisPubIPv4CIDR       = "AIS_PUBLIC_IP_CIDR"

	// false: HTTP transport, with all the TLS config (below) ignored
	// true:  HTTPS/TLS
	// for details and background, see: https://github.com/NVIDIA/aistore/blob/main/docs/environment-vars.md#https
	AisUseHTTPS = "AIS_USE_HTTPS"

	// TLS: client side
	AisClientCert    = "AIS_CRT"
	AisClientCertKey = "AIS_CRT_KEY"
	AisClientCA      = "AIS_CLIENT_CA"

	// client and dev deployment; see also cluster config "net.http.skip_verify"
	AisSkipVerifyCrt = "AIS_SKIP_VERIFY_CRT"

	// tests and CI
	AisNumTarget = "NUM_TARGET"
	AisNumProxy  = "NUM_PROXY"

	// via ais-k8s repo
	// see also:
	// * https://github.com/NVIDIA/ais-k8s/blob/main/operator/pkg/resources/cmn/env.go
	// * docs/environment-vars.md
	AisK8sPod                  = "MY_POD"
	AisK8sNode                 = "MY_NODE"
	AisK8sNamespace            = "K8S_NS"
	AisK8sServiceName          = "MY_SERVICE"
	AisK8sPublicHostname       = "AIS_PUBLIC_HOSTNAME"
	AisK8sClusterDomain        = "AIS_K8S_CLUSTER_DOMAIN"
	AisK8sHostNetwork          = "HOST_NETWORK"
	AisK8sEnableExternalAccess = "ENABLE_EXTERNAL_ACCESS"
)
View Source
const (
	AisAuthEnabled       = "AIS_AUTHN_ENABLED"
	AisAuthURL           = "AIS_AUTHN_URL"
	AisAuthTokenFile     = "AIS_AUTHN_TOKEN_FILE" // fully qualified
	AisAuthToken         = "AIS_AUTHN_TOKEN"      // Only the JWT token itself (excluding the file and JSON)
	AisAuthConfDir       = "AIS_AUTHN_CONF_DIR"   // contains AuthN config and tokens DB
	AisAuthLogDir        = "AIS_AUTHN_LOG_DIR"
	AisAuthLogLevel      = "AIS_AUTHN_LOG_LEVEL"
	AisAuthPort          = "AIS_AUTHN_PORT"
	AisAuthTTL           = "AIS_AUTHN_TTL"
	AisAuthUseHTTPS      = "AIS_AUTHN_USE_HTTPS"
	AisAuthServerCrt     = "AIS_SERVER_CRT"
	AisAuthServerKey     = "AIS_SERVER_KEY"
	AisAuthSecretKey     = "AIS_AUTHN_SECRET_KEY"
	AisAuthAdminUsername = "AIS_AUTHN_SU_NAME"
	AisAuthAdminPassword = "AIS_AUTHN_SU_PASS"
)
View Source
const (
	AWSEndpoint = "S3_ENDPOINT"
	AWSRegion   = "AWS_REGION"
	AWSProfile  = "AWS_PROFILE"
)
View Source
const (
	OCIConfigFilePath              = "OCI_CLI_CONFIG_FILE" // defaults to ~/.oci/config
	OCIProfile                     = "OCI_CLI_PROFILE"     // defaults to DEFAULT
	OCITenancyOCID                 = "OCI_TENANCY_OCID"
	OCICompartmentOCID             = "OCI_COMPARTMENT_OCID"
	OCIUserOCID                    = "OCI_USER_OCID"
	OCIRegion                      = "OCI_REGION"
	OCIFingerprint                 = "OCI_FINGERPRINT"
	OCIPrivateKey                  = "OCI_PRIVATE_KEY"
	OCIMaxPageSize                 = "OCI_MAX_PAGE_SIZE"
	OCIMaxDownloadSegmentSize      = "OCI_MAX_DOWNLOAD_SEGMENT_SIZE"
	OCIMultiPartDownloadThreshold  = "OCI_MULTI_PART_DOWNLOAD_THRESHOLD"
	OCIMultiPartDownloadMaxThreads = "OCI_MULTI_PART_DOWNLOAD_MAX_THREADS"
	OCIMaxUploadSegmentSize        = "OCI_MAX_UPLOAD_SEGMENT_SIZE"
	OCIMultiPartUploadThreshold    = "OCI_MULTI_PART_UPLOAD_THRESHOLD"
	OCIMultiPartUploadMaxThreads   = "OCI_MULTI_PART_UPLOAD_MAX_THREADS"
	OCIMultiPartThreadPoolSize     = "OCI_MULTI_PART_THREAD_POOL_SIZE"
)

Variables

This section is empty.

Functions

func AwsDefaultRegion added in v1.3.23

func AwsDefaultRegion() (region string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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