Documentation ¶
Index ¶
- func BootstrapCluster(ctx *pulumi.Context) error
- func ReplaceSecretsInValues(ctx *pulumi.Context, application *ArgocdApplication) (err error)
- func SyncArgocdApplication(ctx *pulumi.Context, pulumiResourceName string, application ArgocdApplication, ...) (pulumi.Resource, error)
- func SyncKubernetesManifest(ctx *pulumi.Context, pulumiResourceName string, manifest []byte, ...) (pulumi.Resource, error)
- type ArgocdApplication
- type ArgocdApplicationIgnoreDifferences
- type ArgocdApplicationSpec
- type ArgocdApplicationSpecDestination
- type ArgocdApplicationSpecSource
- type ArgocdApplicationSyncPolicy
- type DirectorySource
- type DirectorySourceJsonnet
- type HelmReleaseConfigInput
- type HelmSource
- type HelmSourceFileParameter
- type HelmSourceParameter
- type JsonnetVar
- type K8sPlatformConfigInput
- type KustomizeSource
- type PlatformApplicationConfig
- type PluginSource
- type PluginSourceEnv
- type RetryBackoff
- type SyncPolicyAutomated
- type SyncPolicyRetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapCluster ¶ added in v1.1.3
BootstrapCluster installs argo-cd and kube-prometheus-stack as helm charts, bootstraps the aws-auth configmap, and installs the catalyst squad platform-services chart as an argocd application. Configurations set on stacks are respected.
func ReplaceSecretsInValues ¶ added in v1.1.2
func ReplaceSecretsInValues(ctx *pulumi.Context, application *ArgocdApplication) (err error)
ReplaceSecretsInValues uses a secrets provider to replace templated secret values in the application's helm values string
func SyncArgocdApplication ¶ added in v1.0.2
func SyncArgocdApplication(ctx *pulumi.Context, pulumiResourceName string, application ArgocdApplication, opts ...pulumi.ResourceOption) (pulumi.Resource, error)
SyncArgocdApplication takes in a pulumi resource name, an argocd application, and any pulumi options It will replace secrets in the spec.source.helm.values with the configured secrets provider, then sync the resulting yaml to k8s
func SyncKubernetesManifest ¶
func SyncKubernetesManifest(ctx *pulumi.Context, pulumiResourceName string, manifest []byte, opts ...pulumi.ResourceOption) (pulumi.Resource, error)
SyncKubernetesManifest takes in a pulumi resource name, and a yaml kubernetes manifest as byte array. It writes the manifest to a file, defers deletion of said file, and creates a pulumi config file from it. Pulumi creates the k8s resources from the config file. Recommended use is to store your manifests in yaml file, embed them, template them with pulumi secrets, or variables, and then pass them to this method to sync the kubernetes resource, whatever it may be.
Types ¶
type ArgocdApplication ¶ added in v1.0.2
type ArgocdApplication struct { ApiVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata map[string]interface{} `yaml:"metadata"` Spec ArgocdApplicationSpec `yaml:"spec"` }
ArgocdApplication is a struct that marshalls into valid argocd application yaml. We could use the argo types but we have had problems with the yaml marshalling, and that also requires depending on argo, and nearly the entire k8s api. This is let DRY and less direct but more simple and straightforward. We'll need to keep this in sync with their spec though. see spec at https://github.com/argoproj/argo-cd/blob/master/pkg/apis/application/v1alpha1/types.go
func NewApplicationFromBytes ¶ added in v1.0.2
func NewApplicationFromBytes(bytes []byte) (ArgocdApplication, error)
NewApplicationFromBytes transforms yaml formatted byte array into an ArgocdApplication struct
type ArgocdApplicationIgnoreDifferences ¶ added in v1.0.2
type ArgocdApplicationIgnoreDifferences struct { Group string `yaml:"group,omitempty"` Kind string `yaml:"kind,omitempty"` Name string `yaml:"name,omitempty"` Namespace string `yaml:"namespace,omitempty"` JsonPointers []string `yaml:"jsonPointers,omitempty"` JQPathExpressions []string `yaml:"jqPathExpressions,omitempty"` ManagedFieldsManagers []string `yaml:"managedFieldsManagers,omitempty"` }
type ArgocdApplicationSpec ¶ added in v1.0.2
type ArgocdApplicationSpec struct { Source ArgocdApplicationSpecSource `yaml:"source"` Destination ArgocdApplicationSpecDestination `yaml:"destination"` Project string `yaml:"project"` SyncPolicy ArgocdApplicationSyncPolicy `yaml:"syncPolicy,omitempty"` IgnoreDifferences []ArgocdApplicationIgnoreDifferences `yaml:"ignoreDifferences,omitempty"` }
type ArgocdApplicationSpecDestination ¶ added in v1.0.2
type ArgocdApplicationSpecSource ¶ added in v1.0.2
type ArgocdApplicationSpecSource struct { RepoUrl string `yaml:"repoURL"` Path string `yaml:"path,omitempty"` TargetRevision string `yaml:"targetRevision,omitempty"` Helm HelmSource `yaml:"helm,omitempty"` Kustomize KustomizeSource `yaml:"kustomize,omitempty"` Directory DirectorySource `yaml:"directory,omitempty"` Plugin PluginSource `yaml:"plugin,omitempty"` Chart string `yaml:"chart,omitempty"` }
type ArgocdApplicationSyncPolicy ¶ added in v1.0.2
type ArgocdApplicationSyncPolicy struct { Automated SyncPolicyAutomated `yaml:"automated,omitempty"` Retry SyncPolicyRetry `yaml:"retry,omitempty"` SyncOptions []string `yaml:"syncOptions,omitempty"` }
type DirectorySource ¶ added in v1.0.2
type DirectorySource struct { Recurse bool `yaml:"recurse,omitempty"` Jsonnet DirectorySourceJsonnet `yaml:"jsonnet,omitempty"` Exclude string `yaml:"exclude,omitempty"` Include string `yaml:"include,omitempty"` }
type DirectorySourceJsonnet ¶ added in v1.0.2
type DirectorySourceJsonnet struct { ExtVars []JsonnetVar `yaml:"extVars,omitempty"` TLAs []JsonnetVar `yaml:"TLAs,omitempty"` Libs []string `yaml:"libs,omitempty"` }
type HelmReleaseConfigInput ¶ added in v1.1.3
type HelmSource ¶ added in v1.0.2
type HelmSource struct { ValueFiles []string `yaml:"valueFiles,omitempty"` Parameters []HelmSourceParameter `yaml:"parameters,omitempty"` ReleaseName string `yaml:"releaseName,omitempty"` Values string `yaml:"values,omitempty"` FileParameters []HelmSourceFileParameter `yaml:"fileParameters,omitempty"` Version string `yaml:"version,omitempty"` PassCredentials bool `yaml:"passCredentials,omitempty"` IgnoreMissingValueFiles bool `yaml:"ignoreMissingValueFiles,omitempty"` SkipCrds bool `yaml:"skipCrds,omitempty"` }
type HelmSourceFileParameter ¶ added in v1.0.2
type HelmSourceParameter ¶ added in v1.0.2
type JsonnetVar ¶ added in v1.0.2
type K8sPlatformConfigInput ¶ added in v1.1.3
type K8sPlatformConfigInput struct { // user input ArgocdHelm HelmReleaseConfigInput `json:"argocd-helm-release"` KubePrometheusStackHelm HelmReleaseConfigInput `json:"kube-prometheus-stack-helm-release"` // optional, enable management of eks auth config ManageEksAuthConfigMap bool `json:"manage-eks-auth-configmap"` // optional, management of prometheus remote write basic auth secret ManagePrometheusRemoteWriteBasicAuthSecret bool `json:"manage-prometheus-remote-write-basic-auth-secret"` // defaults to stack name PrometheusRemoteWriteBasicAuthUsername string `json:"prometheus-remote-write-basic-auth-username"` // defaults to "prometheus-remote-write-basic-auth" PrometheusRemoteWriteSecretName string `json:"prometheus-remote-write-basic-auth-secret-name"` // input from eks module KubeConfig pulumi.StringOutput }
type KustomizeSource ¶ added in v1.0.2
type KustomizeSource struct { NamePrefix string `yaml:"namePrefix,omitempty"` NameSuffix string `yaml:"nameSuffix,omitempty"` Images []string `yaml:"images,omitempty"` CommonLabels map[string]string `yaml:"commonLabels,omitempty"` Version string `yaml:"version,omitempty"` CommonAnnotations map[string]string `yaml:"commonAnnotations,omitempty"` ForceCommonLabels bool `yaml:"forceCommonLabels,omitempty"` ForceCommonAnnotations bool `yaml:"forceCommonAnnotations,omitempty"` }
type PlatformApplicationConfig ¶ added in v1.1.3
type PlatformApplicationConfig struct { Enabled bool TargetRevision string SyncPolicy ArgocdApplicationSyncPolicy Values string }
type PluginSource ¶ added in v1.0.2
type PluginSource struct { Name string `yaml:"name,omitempty"` Env []PluginSourceEnv `yaml:"env,omitempty"` }
type PluginSourceEnv ¶ added in v1.0.2
type RetryBackoff ¶ added in v1.0.2
type SyncPolicyAutomated ¶ added in v1.0.2
type SyncPolicyRetry ¶ added in v1.0.2
type SyncPolicyRetry struct { Limit int `yaml:"limit,omitempty"` Backoff RetryBackoff `yaml:"backoff,omitempty"` }