argocdagent

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrincipalAllowedNamespaces         = "principal.allowed-namespaces"
	PrincipalAuth                      = "principal.auth"
	PrincipalLogLevel                  = "principal.log.level"
	PrincipalMetricsPort               = "principal.metrics.port"
	PrincipalNamespace                 = "principal.namespace"
	PrincipalRedisAddress              = "principal.redis-server-address"
	PrincipalLogFormat                 = "principal.log.format"
	PrincipalJwtAllowGenerate          = "principal.jwt.allow-generate"
	PrincipalJWTKeyPath                = "principal.jwt.key-path"
	PrincipalJwtSecretName             = "principal.jwt.secret-name"
	PrincipalListenHost                = "principal.listen.host"
	PrincipalListenPort                = "principal.listen.port"
	PrincipalNamespaceCreateEnable     = "principal.namespace-create.enable"
	PrincipalNamespaceCreatePattern    = "principal.namespace-create.pattern"
	PrincipalNamespaceCreateLabels     = "principal.namespace-create.labels"
	PrincipalResourceProxyCAPath       = "principal.resource-proxy.ca.path"
	PrincipalResourceProxyCASecretName = "principal.resource-proxy.ca.secret-name"
	PrincipalResourceProxySecretName   = "principal.resource-proxy.secret-name"
	PrincipalResourceProxyTLSCertPath  = "principal.resource-proxy.tls.cert-path"
	PrincipalResourceProxyTLSKeyPath   = "principal.resource-proxy.tls.key-path"
	PrincipalResourceProxyTLSCAPath    = "principal.resource-proxy.tls.ca-path"
	PrincipalTLSServerCertPath         = "principal.tls.server.cert-path"
	PrincipalTLSServerKeyPath          = "principal.tls.server.key-path"
	PrincipalTLSServerAllowGenerate    = "principal.tls.server.allow-generate"
	PrincipalTLSServerRootCAPath       = "principal.tls.server.root-ca-path"
	PrincipalTLSClientCertRequire      = "principal.tls.client-cert.require"
	PrincipalTLSClientCertMatchSubject = "principal.tls.client-cert.match-subject"
	PrincipalTLSSecretName             = "principal.tls.secret-name"
	PrincipalTLSServerRootCASecretName = "principal.tls.server.root-ca-secret-name"
	PrincipalEnableWebSocket           = "principal.enable-websocket"
	PrincipalEnableResourceProxy       = "principal.enable-resource-proxy"
	PrincipalKeepAliveMinInterval      = "principal.keep-alive-min-interval"
	PrincipalRedisCompressionType      = "principal.redis-compression-type"
	PrincipalPprofPort                 = "principal.pprof-port"
	PrincipalRedisPassword             = "auth"

	// Environment variable names for Principal configuration
	// These constants define the environment variable names that can override default values
	EnvArgoCDPrincipalListenHost                = "ARGOCD_PRINCIPAL_LISTEN_HOST"
	EnvArgoCDPrincipalListenPort                = "ARGOCD_PRINCIPAL_LISTEN_PORT"
	EnvArgoCDPrincipalLogLevel                  = "ARGOCD_PRINCIPAL_LOG_LEVEL"
	EnvArgoCDPrincipalLogFormat                 = "ARGOCD_PRINCIPAL_LOG_FORMAT"
	EnvArgoCDPrincipalMetricsPort               = "ARGOCD_PRINCIPAL_METRICS_PORT"
	EnvArgoCDPrincipalNamespace                 = "ARGOCD_PRINCIPAL_NAMESPACE"
	EnvArgoCDPrincipalAllowedNamespaces         = "ARGOCD_PRINCIPAL_ALLOWED_NAMESPACES"
	EnvArgoCDPrincipalNamespaceCreateEnable     = "ARGOCD_PRINCIPAL_NAMESPACE_CREATE_ENABLE"
	EnvArgoCDPrincipalNamespaceCreatePattern    = "ARGOCD_PRINCIPAL_NAMESPACE_CREATE_PATTERN"
	EnvArgoCDPrincipalNamespaceCreateLabels     = "ARGOCD_PRINCIPAL_NAMESPACE_CREATE_LABELS"
	EnvArgoCDPrincipalTLSServerCertPath         = "ARGOCD_PRINCIPAL_TLS_SERVER_CERT_PATH"
	EnvArgoCDPrincipalTLSServerKeyPath          = "ARGOCD_PRINCIPAL_TLS_SERVER_KEY_PATH"
	EnvArgoCDPrincipalTLSServerAllowGenerate    = "ARGOCD_PRINCIPAL_TLS_SERVER_ALLOW_GENERATE"
	EnvArgoCDPrincipalTLSServerRootCAPath       = "ARGOCD_PRINCIPAL_TLS_SERVER_ROOT_CA_PATH"
	EnvArgoCDPrincipalTLSClientCertRequire      = "ARGOCD_PRINCIPAL_TLS_CLIENT_CERT_REQUIRE"
	EnvArgoCDPrincipalTLSClientCertMatchSubject = "ARGOCD_PRINCIPAL_TLS_CLIENT_CERT_MATCH_SUBJECT"
	EnvArgoCDPrincipalResourceProxyTLSCertPath  = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_TLS_CERT_PATH"
	EnvArgoCDPrincipalResourceProxyTLSKeyPath   = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_TLS_KEY_PATH"
	EnvArgoCDPrincipalResourceProxyTLSCAPath    = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_TLS_CA_PATH"
	EnvArgoCDPrincipalJWTKeyPath                = "ARGOCD_PRINCIPAL_JWT_KEY_PATH"
	EnvArgoCDPrincipalJWTAllowGenerate          = "ARGOCD_PRINCIPAL_JWT_ALLOW_GENERATE"
	EnvArgoCDPrincipalAuth                      = "ARGOCD_PRINCIPAL_AUTH"
	EnvArgoCDPrincipalEnableWebSocket           = "ARGOCD_PRINCIPAL_ENABLE_WEBSOCKET"
	EnvArgoCDPrincipalEnableResourceProxy       = "ARGOCD_PRINCIPAL_ENABLE_RESOURCE_PROXY"
	EnvArgoCDPrincipalKeepAliveMinInterval      = "ARGOCD_PRINCIPAL_KEEP_ALIVE_MIN_INTERVAL"
	EnvArgoCDPrincipalRedisServerAddress        = "ARGOCD_PRINCIPAL_REDIS_SERVER_ADDRESS"
	EnvArgoCDPrincipalRedisCompressionType      = "ARGOCD_PRINCIPAL_REDIS_COMPRESSION_TYPE"
	EnvArgoCDPrincipalPprofPort                 = "ARGOCD_PRINCIPAL_PPROF_PORT"
	EnvArgoCDPrincipalTlsSecretName             = "ARGOCD_PRINCIPAL_TLS_SECRET_NAME"
	EnvArgoCDPrincipalTlsServerRootCASecretName = "ARGOCD_PRINCIPAL_TLS_SERVER_ROOT_CA_SECRET_NAME"
	EnvArgoCDPrincipalResourceProxySecretName   = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_SECRET_NAME"
	EnvArgoCDPrincipalResourceProxyCaSecretName = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_CA_SECRET_NAME"
	EnvArgoCDPrincipalResourceProxyCaPath       = "ARGOCD_PRINCIPAL_RESOURCE_PROXY_CA_PATH"
	EnvArgoCDPrincipalJwtSecretName             = "ARGOCD_PRINCIPAL_JWT_SECRET_NAME"
	EnvRedisPassword                            = "REDIS_PASSWORD"
	EnvArgoCDPrincipalImage                     = "ARGOCD_PRINCIPAL_IMAGE"
)

Configuration keys for the Principal component ConfigMap These constants define the keys used in the ConfigMap data section

View Source
const (
	// PrincipalServiceHTTPSPort is the external port for the principal service
	PrincipalServiceHTTPSPort = 443
	// PrincipalServiceTargetPort is the target port for the principal service
	PrincipalServiceTargetPort = 8443
	// PrincipalServicePortName is the name of the HTTPS port
	PrincipalServicePortName = "https"
	// PrincipalMetricsServicePortName is the name of the metrics port
	PrincipalMetricsServicePortName = "metrics"
	// PrincipalMetricsServicePort is the external port for the principal metrics service
	PrincipalMetricsServicePort = 8000
	// PrincipalMetricsServiceTargetPort is the target port for the principal metrics service
	PrincipalMetricsServiceTargetPort = 8000
	// PrincipalRedisProxyServicePortName is the name of the Redis proxy port
	PrincipalRedisProxyServicePortName = "redis"
	// PrincipalRedisProxyServicePort is the external port for the principal Redis proxy service
	PrincipalRedisProxyServicePort = 6379
	// PrincipalRedisProxyServiceTargetPort is the target port for the principal Redis proxy service
	PrincipalRedisProxyServiceTargetPort = 6379
)

Variables

This section is empty.

Functions

func ReconcilePrincipalClusterRoleBinding

func ReconcilePrincipalClusterRoleBinding(client client.Client, compName string, sa *corev1.ServiceAccount, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalClusterRoleBinding reconciles a ClusterRoleBinding for the ArgoCD agent principal component. This function handles the creation, update, and deletion of ClusterRoleBindings based on the principal's enabled state.

func ReconcilePrincipalClusterRoles

func ReconcilePrincipalClusterRoles(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) (*v1.ClusterRole, error)

ReconcilePrincipalClusterRoles manages the lifecycle of a ClusterRole resource for the ArgoCD agent principal. This function creates, updates, or deletes the ClusterRole based on the principal's enabled status.

func ReconcilePrincipalConfigMap

func ReconcilePrincipalConfigMap(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalConfigMap manages the lifecycle of the Principal component's ConfigMap. It creates, updates, or deletes the ConfigMap based on the ArgoCD CR's Principal configuration. The ConfigMap contains all the configuration parameters needed by the Principal component.

func ReconcilePrincipalDeployment

func ReconcilePrincipalDeployment(client client.Client, compName, saName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalDeployment reconciles the ArgoCD agent principal deployment. It creates, updates, or deletes the deployment based on the ArgoCD CR configuration.

func ReconcilePrincipalMetricsService

func ReconcilePrincipalMetricsService(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalMetricsService reconciles the principal metrics service for the ArgoCD agent. It creates, updates, or deletes the metrics service based on the principal configuration.

func ReconcilePrincipalRedisProxyService

func ReconcilePrincipalRedisProxyService(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalRedisProxyService reconciles the principal Redis proxy service for the ArgoCD agent. It creates, updates, or deletes the Redis proxy service based on the principal configuration.

func ReconcilePrincipalRole

func ReconcilePrincipalRole(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) (*v1.Role, error)

ReconcilePrincipalRole manages the lifecycle of a Role resource for the ArgoCD agent principal. This function creates, updates, or deletes the Role based on the principal's enabled status.

func ReconcilePrincipalRoleBinding

func ReconcilePrincipalRoleBinding(client client.Client, compName string, sa *corev1.ServiceAccount, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalRoleBinding reconciles a RoleBinding for the ArgoCD agent principal component. This function handles the creation, update, and deletion of RoleBindings based on the principal's enabled state.

func ReconcilePrincipalService

func ReconcilePrincipalService(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) error

ReconcilePrincipalService reconciles the principal service for the ArgoCD agent. It creates, updates, or deletes the service based on the principal configuration.

func ReconcilePrincipalServiceAccount

func ReconcilePrincipalServiceAccount(client client.Client, compName string, cr *argoproj.ArgoCD, scheme *runtime.Scheme) (*corev1.ServiceAccount, error)

ReconcilePrincipalServiceAccount reconciles the service account for the ArgoCD agent principal component. It handles creation, deletion, and updates of the service account based on the principal configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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