pkg

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelSelector is the label selector for the secret
	LabelSelector = "argocd.argoproj.io/secret-type in (repo-creds, repository)"
	// Scope for the Azure DevOps access token
	AzureDevOpsScope = "499b84ac-1321-427f-aa17-267ca6975798/.default"
	// Scope for Azure COntainer Registry access token
	AzureContainerRegistryScope = "https://management.azure.com/.default"
	// Default username for the access token
	DefaultUsername = "00000000-0000-0000-0000-000000000000"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureHelper

type AzureHelper struct {
	// contains filtered or unexported fields
}

func NewAzureHelper

func NewAzureHelper(log logr.Logger) (*AzureHelper, error)

func (*AzureHelper) GetAccessToken added in v0.4.0

func (a *AzureHelper) GetAccessToken(url string) (*jwt.Token, error)

type Config

type Config struct {
	Namespace              string   `envconfig:"POD_NAMESPACE" default:"argocd"`
	MatchUrls              []string `envconfig:"MATCH_URLS" default:"https://dev.azure.com"`
	InClusterConfiguration bool     `envconfig:"IN_CLUSTER_CONFIG" default:"true"`
	InClusterConfigMap     string   `envconfig:"IN_CLUSTER_CONFIG_MAP" default:"argocd-ado-awi-cred-sidecar"`
}

Config holds configuration from the env variables

func ParseConfig

func ParseConfig() (*Config, error)

ParseConfig parses the configuration from env variables

type Coordinator added in v0.3.0

type Coordinator struct {
	// contains filtered or unexported fields
}

func NewCoordinator added in v0.3.0

func NewCoordinator(log logr.Logger) (*Coordinator, error)

func (*Coordinator) EvaluateAccessTokenExpiration added in v0.3.0

func (c *Coordinator) EvaluateAccessTokenExpiration() error

type KubernetesHelper

type KubernetesHelper struct {
	// contains filtered or unexported fields
}

func NewKubernetesHelper

func NewKubernetesHelper(log logr.Logger, defaultNamespace string) (*KubernetesHelper, error)

func (*KubernetesHelper) GetInClusterConfiguration added in v0.4.0

func (k *KubernetesHelper) GetInClusterConfiguration(cmName string) ([]string, error)

func (*KubernetesHelper) SearchSecret

func (k *KubernetesHelper) SearchSecret(urls []string) (*[]corev1.Secret, error)

func (*KubernetesHelper) UpdateSecret

func (k *KubernetesHelper) UpdateSecret(accessToken string, secret *corev1.Secret) error

Jump to

Keyboard shortcuts

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