rebrand: white-label served surfaces Argo CD -> Hanzo CD

Sweep residual upstream brand from Hanzo-served surfaces (UI, CLI, API docs,
notifications). Imports, identifiers, env vars, and k8s object/command names
are left intact.

- UI: HelpIcon tooltips, help-page + cluster-management doc links ->
  docs.hanzo.ai, login + sidebar logos -> hanzo-logo-white.svg (alt text +
  broken Argo.svg / logo.png refs), rendered "Argo CD" -> "Hanzo CD"
- CLI (cmd/, server/): Short/Long/Example/flag help + "ArgoCD API Server"
  startup banner -> Hanzo CD
- API: .proto service-doc comments + generated assets/swagger.json -> Hanzo CD
- notification controller comment

Preserved (imports / identifiers / contracts): module github.com/hanzoai/deploy,
ARGOCD_* env vars, argocd-* binary/command names, ArgoCD* Go identifiers,
argoproj.io/argocd label values, argo-* CSS classes, k8s object names.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-07-22 17:56:24 -07:00
co-authored by Hanzo Dev
parent ee12fac6f6
commit 14d5f97186
54 changed files with 186 additions and 186 deletions
+19 -19
View File
@@ -4203,7 +4203,7 @@
"tags": [
"SettingsService"
],
"summary": "Get returns Argo CD settings",
"summary": "Get returns Hanzo CD settings",
"operationId": "SettingsService_Get",
"responses": {
"200": {
@@ -4226,7 +4226,7 @@
"tags": [
"SettingsService"
],
"summary": "Get returns Argo CD plugins",
"summary": "Get returns Hanzo CD plugins",
"operationId": "SettingsService_GetPlugins",
"responses": {
"200": {
@@ -5538,7 +5538,7 @@
"$ref": "#/definitions/v1alpha1HealthStatus"
},
"hook": {
"description": "Hook is true if the resource is used as a lifecycle hook in an Argo CD application.",
"description": "Hook is true if the resource is used as a lifecycle hook in an Hanzo CD application.",
"type": "boolean"
},
"kind": {
@@ -5812,7 +5812,7 @@
}
},
"eventsEvent": {
"description": "Event mirrors corev1.Event and exposes the fields consumed by the Argo CD\nAPI and UI. Event is a report of an event somewhere in the cluster. Events\nhave a limited retention time and triggers and messages may evolve with\ntime. Event consumers should not rely on the timing of an event with a\ngiven Reason reflecting a consistent underlying trigger, or the continued\nexistence of events with that Reason. Events should be treated as\ninformative, best-effort, supplemental data.",
"description": "Event mirrors corev1.Event and exposes the fields consumed by the Hanzo CD\nAPI and UI. Event is a report of an event somewhere in the cluster. Events\nhave a limited retention time and triggers and messages may evolve with\ntime. Event consumers should not rely on the timing of an event with a\ngiven Reason reflecting a consistent underlying trigger, or the continued\nexistence of events with that Reason. Events should be treated as\ninformative, best-effort, supplemental data.",
"type": "object",
"properties": {
"action": {
@@ -5871,7 +5871,7 @@
}
},
"eventsEventList": {
"description": "EventList is a list of Argo CD Event messages. It mirrors corev1.EventList\nfield-for-field but is defined in Argo CD's apiclient package to avoid\npulling Kubernetes protobuf types into the public gRPC surface.",
"description": "EventList is a list of Hanzo CD Event messages. It mirrors corev1.EventList\nfield-for-field but is defined in Hanzo CD's apiclient package to avoid\npulling Kubernetes protobuf types into the public gRPC surface.",
"type": "object",
"properties": {
"items": {
@@ -7551,7 +7551,7 @@
},
"v1alpha1ApplicationSetTemplateMeta": {
"type": "object",
"title": "ApplicationSetTemplateMeta represents the Argo CD application fields that may\nbe used for Applications generated from the ApplicationSet (based on metav1.ObjectMeta)",
"title": "ApplicationSetTemplateMeta represents the Hanzo CD application fields that may\nbe used for Applications generated from the ApplicationSet (based on metav1.ObjectMeta)",
"properties": {
"annotations": {
"type": "object",
@@ -7677,7 +7677,7 @@
"title": "ApplicationSourceHelm holds helm specific options\n+protobuf.options.(gogoproto.goproto_stringer)=false",
"properties": {
"apiVersions": {
"description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nArgo CD uses the API versions of the target cluster. The format is [group/]version/kind.",
"description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nHanzo CD uses the API versions of the target cluster. The format is [group/]version/kind.",
"type": "array",
"items": {
"type": "string"
@@ -7695,7 +7695,7 @@
"title": "IgnoreMissingValueFiles prevents helm template from failing when valueFiles do not exist locally by not appending them to helm template --values"
},
"kubeVersion": {
"description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD\nuses the Kubernetes version of the target cluster.",
"description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Hanzo CD\nuses the Kubernetes version of the target cluster.",
"type": "string"
},
"namespace": {
@@ -7781,7 +7781,7 @@
"title": "ApplicationSourceKustomize holds options specific to an Application source specific to Kustomize",
"properties": {
"apiVersions": {
"description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nArgo CD uses the API versions of the target cluster. The format is [group/]version/kind.",
"description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nHanzo CD uses the API versions of the target cluster. The format is [group/]version/kind.",
"type": "array",
"items": {
"type": "string"
@@ -7832,7 +7832,7 @@
}
},
"kubeVersion": {
"description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD\nuses the Kubernetes version of the target cluster.",
"description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Hanzo CD\nuses the Kubernetes version of the target cluster.",
"type": "string"
},
"labelIncludeTemplates": {
@@ -8063,7 +8063,7 @@
}
},
"v1alpha1ApplicationTree": {
"description": "ApplicationTree represents the hierarchical structure of resources associated with an Argo CD application.",
"description": "ApplicationTree represents the hierarchical structure of resources associated with an Hanzo CD application.",
"type": "object",
"properties": {
"hosts": {
@@ -8294,7 +8294,7 @@
}
},
"v1alpha1ClusterGenerator": {
"description": "ClusterGenerator defines a generator to match against clusters registered with ArgoCD.",
"description": "ClusterGenerator defines a generator to match against clusters registered with Hanzo CD.",
"type": "object",
"properties": {
"flatList": {
@@ -8330,7 +8330,7 @@
"applicationsCount": {
"type": "integer",
"format": "int64",
"title": "ApplicationsCount is the number of applications managed by Argo CD on the cluster"
"title": "ApplicationsCount is the number of applications managed by Hanzo CD on the cluster"
},
"cacheInfo": {
"$ref": "#/definitions/v1alpha1ClusterCacheInfo"
@@ -8527,7 +8527,7 @@
}
},
"v1alpha1DuckTypeGenerator": {
"description": "DuckType defines a generator to match against clusters registered with ArgoCD.",
"description": "DuckType defines a generator to match against clusters registered with Hanzo CD.",
"type": "object",
"properties": {
"configMapRef": {
@@ -9630,7 +9630,7 @@
},
"forceHttpBasicAuth": {
"type": "boolean",
"title": "ForceHttpBasicAuth specifies whether Argo CD should attempt to force basic auth for HTTP connections"
"title": "ForceHttpBasicAuth specifies whether Hanzo CD should attempt to force basic auth for HTTP connections"
},
"gcpServiceAccountKey": {
"type": "string",
@@ -9757,7 +9757,7 @@
},
"forceHttpBasicAuth": {
"type": "boolean",
"title": "ForceHttpBasicAuth specifies whether Argo CD should attempt to force basic auth for HTTP connections"
"title": "ForceHttpBasicAuth specifies whether Hanzo CD should attempt to force basic auth for HTTP connections"
},
"gcpServiceAccountKey": {
"type": "string",
@@ -9949,7 +9949,7 @@
}
},
"v1alpha1ResourceDiff": {
"description": "ResourceDiff holds the diff between a live and target resource object in Argo CD.\nIt is used to compare the desired state (from Git/Helm) with the actual state in the cluster.",
"description": "ResourceDiff holds the diff between a live and target resource object in Hanzo CD.\nIt is used to compare the desired state (from Git/Helm) with the actual state in the cluster.",
"type": "object",
"properties": {
"diff": {
@@ -9989,7 +9989,7 @@
"type": "string"
},
"predictedLiveState": {
"description": "PredictedLiveState contains the JSON-serialized resource state that Argo CD predicts based on the\ncombination of the normalized live state and the desired target state.",
"description": "PredictedLiveState contains the JSON-serialized resource state that Hanzo CD predicts based on the\ncombination of the normalized live state and the desired target state.",
"type": "string"
},
"resourceVersion": {
@@ -11124,7 +11124,7 @@
},
"versionVersionMessage": {
"type": "object",
"title": "VersionMessage represents version of the Argo CD API server",
"title": "VersionMessage represents version of the Hanzo CD API server",
"properties": {
"BuildDate": {
"type": "string"
@@ -102,8 +102,8 @@ func NewCommand() *cobra.Command {
)
command := cobra.Command{
Use: common.CommandApplicationController,
Short: "Run ArgoCD Application Controller",
Long: "ArgoCD application controller is a Kubernetes controller that continuously monitors running applications and compares the current, live state against the desired target state (as specified in the repo). This command runs Application Controller in the foreground. It can be configured by following options.",
Short: "Run Hanzo CD Application Controller",
Long: "Hanzo CD application controller is a Kubernetes controller that continuously monitors running applications and compares the current, live state against the desired target state (as specified in the repo). This command runs Application Controller in the foreground. It can be configured by following options.",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, _ []string) error {
ctx, cancel := context.WithCancel(c.Context())
@@ -113,7 +113,7 @@ func NewCommand() *cobra.Command {
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
vers.LogStartupInfo(
"ArgoCD Application Controller",
"Hanzo CD Application Controller",
map[string]any{
"namespace": namespace,
},
@@ -307,7 +307,7 @@ func NewCommand() *cobra.Command {
command.Flags().BoolVar(&serverSideDiff, "server-side-diff-enabled", env.ParseBoolFromEnv(common.EnvServerSideDiff, false), "Feature flag to enable ServerSide diff. Default (\"false\")")
command.Flags().DurationVar(&ignoreNormalizerOpts.JQExecutionTimeout, "ignore-normalizer-jq-execution-timeout-seconds", env.ParseDurationFromEnv("ARGOCD_IGNORE_NORMALIZER_JQ_TIMEOUT", 0*time.Second, 0, math.MaxInt64), "Set ignore normalizer JQ execution timeout")
// argocd k8s event logging flag
command.Flags().StringSliceVar(&enableK8sEvent, "enable-k8s-event", env.StringsFromEnv("ARGOCD_ENABLE_K8S_EVENT", argo.DefaultEnableEventList(), ","), "Enable ArgoCD to use k8s event. For disabling all events, set the value as `none`. (e.g --enable-k8s-event=none), For enabling specific events, set the value as `event reason`. (e.g --enable-k8s-event=StatusRefreshed,ResourceCreated)")
command.Flags().StringSliceVar(&enableK8sEvent, "enable-k8s-event", env.StringsFromEnv("ARGOCD_ENABLE_K8S_EVENT", argo.DefaultEnableEventList(), ","), "Enable Hanzo CD to use k8s event. For disabling all events, set the value as `none`. (e.g --enable-k8s-event=none), For enabling specific events, set the value as `event reason`. (e.g --enable-k8s-event=StatusRefreshed,ResourceCreated)")
command.Flags().BoolVar(&hydratorEnabled, "hydrator-enabled", env.ParseBoolFromEnv("ARGOCD_HYDRATOR_ENABLED", false), "Feature flag to enable Hydrator. Default (\"false\")")
repoServerClientTLSConfigSrc = tls.AddClientTLSFlagsToCmdWithPrefix(&command, "APPLICATION_CONTROLLER")
cacheSource = appstatecache.AddCacheFlagsToCmd(&command, cacheutil.Options{
@@ -91,7 +91,7 @@ func NewCommand() *cobra.Command {
_ = appv1alpha1.AddToScheme(scheme)
command := cobra.Command{
Use: common.CommandApplicationSetController,
Short: "Starts Argo CD ApplicationSet controller",
Short: "Starts Hanzo CD ApplicationSet controller",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, _ []string) error {
ctx := c.Context()
@@ -102,7 +102,7 @@ func NewCommand() *cobra.Command {
errors.CheckError(err)
vers.LogStartupInfo(
"ArgoCD ApplicationSet Controller",
"Hanzo CD ApplicationSet Controller",
map[string]any{
"namespace": namespace,
},
@@ -297,8 +297,8 @@ func NewCommand() *cobra.Command {
command.Flags().BoolVar(&enableLeaderElection, "enable-leader-election", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_LEADER_ELECTION", false),
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
command.Flags().StringSliceVar(&applicationSetNamespaces, "applicationset-namespaces", env.StringsFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES", []string{}, ","), "Argo CD applicationset namespaces")
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", env.StringFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER", common.DefaultRepoServerAddr), "Argo CD repo server address")
command.Flags().StringSliceVar(&applicationSetNamespaces, "applicationset-namespaces", env.StringsFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES", []string{}, ","), "Hanzo CD applicationset namespaces")
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", env.StringFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER", common.DefaultRepoServerAddr), "Hanzo CD repo server address")
command.Flags().StringVar(&policy, "policy", env.StringFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_POLICY", ""), "Modify how application is synced between the generator and the cluster. Default is '' (empty), which means AppSets default to 'sync', but they may override that default. Setting an explicit value prevents AppSet-level overrides, unless --allow-policy-override is enabled. Explicit options are: 'sync' (create & update & delete), 'create-only', 'create-update' (no deletion), 'create-delete' (no update)")
command.Flags().BoolVar(&enablePolicyOverride, "enable-policy-override", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_POLICY_OVERRIDE", policy == ""), "For security reason if 'policy' is set, it is not possible to override it at applicationSet level. 'allow-policy-override' allows user to define their own policy")
command.Flags().BoolVar(&debugLog, "debug", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_DEBUG", false), "Print debug logs. Takes precedence over loglevel")
@@ -29,14 +29,14 @@ func NewCommand() *cobra.Command {
)
command := cobra.Command{
Use: common.CommandCMPServer,
Short: "Run ArgoCD ConfigManagementPlugin Server",
Long: "ArgoCD ConfigManagementPlugin Server is an internal service which runs as sidecar container in reposerver deployment. The following configuration options are available:",
Short: "Run Hanzo CD ConfigManagementPlugin Server",
Long: "Hanzo CD ConfigManagementPlugin Server is an internal service which runs as sidecar container in reposerver deployment. The following configuration options are available:",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, _ []string) error {
ctx := c.Context()
vers := common.GetVersion()
vers.LogStartupInfo("ArgoCD ConfigManagementPlugin Server", nil)
vers.LogStartupInfo("Hanzo CD ConfigManagementPlugin Server", nil)
cli.SetLogFormat(cmdutil.LogFormat)
cli.SetLogLevel(cmdutil.LogLevel)
@@ -36,12 +36,12 @@ func NewCommand() *cobra.Command {
)
command := &cobra.Command{
Use: common.CommandCommitServer,
Short: "Run Argo CD Commit Server",
Long: "Argo CD Commit Server is an internal service which commits and pushes hydrated manifests to git. This command runs Commit Server in the foreground.",
Short: "Run Hanzo CD Commit Server",
Long: "Hanzo CD Commit Server is an internal service which commits and pushes hydrated manifests to git. This command runs Commit Server in the foreground.",
RunE: func(cmd *cobra.Command, _ []string) error {
vers := common.GetVersion()
vers.LogStartupInfo(
"Argo CD Commit Server",
"Hanzo CD Commit Server",
map[string]any{
"port": listenPort,
},
+5 -5
View File
@@ -28,8 +28,8 @@ import (
func NewCommand() *cobra.Command {
command := &cobra.Command{
Use: common.CommandDex,
Short: "argocd-dex tools used by Argo CD",
Long: "argocd-dex has internal utility tools used by Argo CD",
Short: "argocd-dex tools used by Hanzo CD",
Long: "argocd-dex has internal utility tools used by Hanzo CD",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
@@ -48,7 +48,7 @@ func NewRunDexCommand() *cobra.Command {
)
command := cobra.Command{
Use: "rundex",
Short: "Runs dex generating a config using settings from the Argo CD configmap and secret",
Short: "Runs dex generating a config using settings from the Hanzo CD configmap and secret",
RunE: func(c *cobra.Command, _ []string) error {
ctx := c.Context()
@@ -56,7 +56,7 @@ func NewRunDexCommand() *cobra.Command {
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
vers.LogStartupInfo(
"ArgoCD Dex Server",
"Hanzo CD Dex Server",
map[string]any{
"namespace": namespace,
},
@@ -155,7 +155,7 @@ func NewGenDexConfigCommand() *cobra.Command {
)
command := cobra.Command{
Use: "gendexcfg",
Short: "Generates a dex config from Argo CD settings",
Short: "Generates a dex config from Hanzo CD settings",
RunE: func(c *cobra.Command, _ []string) error {
ctx := c.Context()
@@ -19,7 +19,7 @@ import (
func NewCommand() *cobra.Command {
command := cobra.Command{
Use: common.CommandGitAskPass,
Short: "Argo CD git credential helper",
Short: "Hanzo CD git credential helper",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, _ []string) {
ctx := c.Context()
@@ -55,7 +55,7 @@ func NewCommand() *cobra.Command {
)
command := cobra.Command{
Use: common.CommandNotifications,
Short: "Starts Argo CD Notifications controller",
Short: "Starts Hanzo CD Notifications controller",
RunE: func(_ *cobra.Command, _ []string) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -64,7 +64,7 @@ func NewCommand() *cobra.Command {
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
vers.LogStartupInfo(
"ArgoCD Notifications Controller",
"Hanzo CD Notifications Controller",
map[string]any{
"namespace": namespace,
},
@@ -133,7 +133,7 @@ func NewCommand() *cobra.Command {
repoClientset := apiclient.NewRepoServerClientset(argocdRepoServer, 5, tlsConfig)
argocdService, err := service.NewArgoCDService(k8sClient, dynamicClient, namespace, repoClientset)
if err != nil {
return fmt.Errorf("failed to initialize Argo CD service: %w", err)
return fmt.Errorf("failed to initialize Hanzo CD service: %w", err)
}
defer argocdService.Close()
@@ -172,14 +172,14 @@ func NewCommand() *cobra.Command {
command.Flags().StringVar(&logLevel, "loglevel", env.StringFromEnv("ARGOCD_NOTIFICATIONS_CONTROLLER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error")
command.Flags().StringVar(&logFormat, "logformat", env.StringFromEnv("ARGOCD_NOTIFICATIONS_CONTROLLER_LOGFORMAT", "json"), "Set the logging format. One of: json|text")
command.Flags().IntVar(&metricsPort, "metrics-port", defaultMetricsPort, "Metrics port")
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", common.DefaultRepoServerAddr, "Argo CD repo server address")
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", common.DefaultRepoServerAddr, "Hanzo CD repo server address")
command.Flags().BoolVar(&argocdRepoServerPlaintext, "argocd-repo-server-plaintext", env.ParseBoolFromEnv("ARGOCD_NOTIFICATION_CONTROLLER_REPO_SERVER_PLAINTEXT", false), "Use a plaintext client (non-TLS) to connect to repository server")
command.Flags().BoolVar(&argocdRepoServerStrictTLS, "argocd-repo-server-strict-tls", false, "Perform strict validation of TLS certificates when connecting to repo server")
errors.CheckError(command.Flags().MarkDeprecated("argocd-repo-server-strict-tls", "use --argocd-repo-server-ca-cert-path instead"))
command.Flags().StringVar(&configMapName, "config-map-name", "argocd-notifications-cm", "Set notifications ConfigMap name")
command.Flags().StringVar(&secretName, "secret-name", "argocd-notifications-secret", "Set notifications Secret name")
command.Flags().StringSliceVar(&applicationNamespaces, "application-namespaces", env.StringsFromEnv("ARGOCD_APPLICATION_NAMESPACES", []string{}, ","), "List of additional namespaces that this controller should send notifications for")
command.Flags().BoolVar(&selfServiceNotificationEnabled, "self-service-notification-enabled", env.ParseBoolFromEnv("ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED", false), "Allows the Argo CD notification controller to pull notification config from the namespace that the resource is in. This is useful for self-service notification.")
command.Flags().BoolVar(&selfServiceNotificationEnabled, "self-service-notification-enabled", env.ParseBoolFromEnv("ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED", false), "Allows the Hanzo CD notification controller to pull notification config from the namespace that the resource is in. This is useful for self-service notification.")
repoServerClientTLSConfigSrc = tls.AddClientTLSFlagsToCmdWithPrefix(&command, "NOTIFICATION_CONTROLLER")
return &command
}
@@ -87,15 +87,15 @@ func NewCommand() *cobra.Command {
)
command := cobra.Command{
Use: common.CommandRepoServer,
Short: "Run ArgoCD Repository Server",
Long: "ArgoCD Repository Server is an internal service which maintains a local cache of the Git repository holding the application manifests, and is responsible for generating and returning the Kubernetes manifests. This command runs Repository Server in the foreground. It can be configured by following options.",
Short: "Run Hanzo CD Repository Server",
Long: "Hanzo CD Repository Server is an internal service which maintains a local cache of the Git repository holding the application manifests, and is responsible for generating and returning the Kubernetes manifests. This command runs Repository Server in the foreground. It can be configured by following options.",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, _ []string) error {
ctx := c.Context()
vers := common.GetVersion()
vers.LogStartupInfo(
"ArgoCD Repository Server",
"Hanzo CD Repository Server",
map[string]any{
"port": listenPort,
},
+7 -7
View File
@@ -108,7 +108,7 @@ func NewCommand() *cobra.Command {
)
command := &cobra.Command{
Use: common.CommandServer,
Short: "Run the ArgoCD API server",
Short: "Run the Hanzo CD API server",
Long: "The API server is a gRPC/REST server which exposes the API consumed by the Web UI, CLI, and CI/CD systems. This command runs API server in the foreground. It can be configured by following options.",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, _ []string) {
@@ -118,7 +118,7 @@ func NewCommand() *cobra.Command {
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
vers.LogStartupInfo(
"ArgoCD API Server",
"Hanzo CD API Server",
map[string]any{
"namespace": namespace,
"port": listenPort,
@@ -296,10 +296,10 @@ func NewCommand() *cobra.Command {
}
},
Example: templates.Examples(`
# Start the Argo CD API server with default settings
# Start the Hanzo CD API server with default settings
$ argocd-server
# Start the Argo CD API server on a custom port and enable tracing
# Start the Hanzo CD API server on a custom port and enable tracing
$ argocd-server --port 8888 --otlp-address localhost:4317
`),
}
@@ -307,8 +307,8 @@ func NewCommand() *cobra.Command {
clientConfig = cli.AddKubectlFlagsToCmd(command)
command.Flags().BoolVar(&insecure, "insecure", env.ParseBoolFromEnv("ARGOCD_SERVER_INSECURE", false), "Run server without TLS")
command.Flags().StringVar(&staticAssetsDir, "staticassets", env.StringFromEnv("ARGOCD_SERVER_STATIC_ASSETS", "/shared/app"), "Directory path that contains additional static assets")
command.Flags().StringVar(&baseHRef, "basehref", env.StringFromEnv("ARGOCD_SERVER_BASEHREF", "/"), "Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&rootPath, "rootpath", env.StringFromEnv("ARGOCD_SERVER_ROOTPATH", ""), "Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&baseHRef, "basehref", env.StringFromEnv("ARGOCD_SERVER_BASEHREF", "/"), "Value for base href in index.html. Used if Hanzo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&rootPath, "rootpath", env.StringFromEnv("ARGOCD_SERVER_ROOTPATH", ""), "Used if Hanzo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_SERVER_LOGFORMAT", "json"), "Set the logging format. One of: json|text")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_SERVER_LOG_LEVEL", "info"), "Set the logging level. One of: debug|info|warn|error")
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level")
@@ -340,7 +340,7 @@ func NewCommand() *cobra.Command {
command.Flags().IntVar(&webhookParallelism, "webhook-parallelism-limit", env.ParseNumFromEnv("ARGOCD_SERVER_WEBHOOK_PARALLELISM_LIMIT", 50, 1, 1000), "Number of webhook requests processed concurrently")
command.Flags().IntVar(&globCacheSize, "glob-cache-size", env.ParseNumFromEnv("ARGOCD_SERVER_GLOB_CACHE_SIZE", utilglob.DefaultGlobCacheSize, 1, math.MaxInt32), "Maximum number of compiled glob patterns to cache for RBAC evaluation")
command.Flags().IntVar(&webhookRefreshWorkers, "webhook-refresh-workers", env.ParseNumFromEnv("ARGOCD_SERVER_WEBHOOK_REFRESH_WORKERS", 20, 1, 1000), "Number of webhook refresh requests processed concurrently")
command.Flags().StringSliceVar(&enableK8sEvent, "enable-k8s-event", env.StringsFromEnv("ARGOCD_ENABLE_K8S_EVENT", argo.DefaultEnableEventList(), ","), "Enable ArgoCD to use k8s event. For disabling all events, set the value as `none`. (e.g --enable-k8s-event=none), For enabling specific events, set the value as `event reason`. (e.g --enable-k8s-event=StatusRefreshed,ResourceCreated)")
command.Flags().StringSliceVar(&enableK8sEvent, "enable-k8s-event", env.StringsFromEnv("ARGOCD_ENABLE_K8S_EVENT", argo.DefaultEnableEventList(), ","), "Enable Hanzo CD to use k8s event. For disabling all events, set the value as `none`. (e.g --enable-k8s-event=none), For enabling specific events, set the value as `event reason`. (e.g --enable-k8s-event=StatusRefreshed,ResourceCreated)")
command.Flags().BoolVar(&hydratorEnabled, "hydrator-enabled", env.ParseBoolFromEnv("ARGOCD_HYDRATOR_ENABLED", false), "Feature flag to enable Hydrator. Default (\"false\")")
command.Flags().BoolVar(&syncWithReplaceAllowed, "sync-with-replace-allowed", env.ParseBoolFromEnv("ARGOCD_SYNC_WITH_REPLACE_ALLOWED", true), "Whether to allow users to select replace for syncs from UI/CLI")
+3 -3
View File
@@ -57,12 +57,12 @@ func NewAdminCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
command := &cobra.Command{
Use: "admin",
Short: "Contains a set of commands useful for Argo CD administrators and requires direct Kubernetes access",
Short: "Contains a set of commands useful for Hanzo CD administrators and requires direct Kubernetes access",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
Example: `# Access the Argo CD web UI
Example: `# Access the Hanzo CD web UI
$ argocd admin dashboard
# Reset the initial admin password
@@ -100,7 +100,7 @@ func newArgoCDClientsets(config *rest.Config, namespace string) *argoCDClientset
}
}
// isArgoCDSecret returns whether or not the given secret is a part of Argo CD configuration
// isArgoCDSecret returns whether or not the given secret is a part of Hanzo CD configuration
// (e.g. argocd-secret, repo credentials, or cluster credentials)
func isArgoCDSecret(un unstructured.Unstructured) bool {
secretName := un.GetName()
+9 -9
View File
@@ -29,7 +29,7 @@ import (
secutil "github.com/hanzoai/deploy/util/security"
)
// NewExportCommand defines a new command for exporting Kubernetes and Argo CD resources.
// NewExportCommand defines a new command for exporting Kubernetes and Hanzo CD resources.
func NewExportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
@@ -39,7 +39,7 @@ func NewExportCommand() *cobra.Command {
)
command := cobra.Command{
Use: "export",
Short: "Export all Argo CD data to stdout (default) or a file",
Short: "Export all Hanzo CD data to stdout (default) or a file",
Run: func(c *cobra.Command, _ []string) {
ctx := c.Context()
@@ -139,13 +139,13 @@ func NewExportCommand() *cobra.Command {
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().StringVarP(&out, "out", "o", "-", "Output to the specified file instead of stdout")
command.Flags().StringSliceVarP(&applicationNamespaces, "application-namespaces", "", []string{}, fmt.Sprintf("Comma-separated list of namespace globs to export applications from, in addition to the control plane namespace (Argo CD namespace). "+
command.Flags().StringSliceVarP(&applicationNamespaces, "application-namespaces", "", []string{}, fmt.Sprintf("Comma-separated list of namespace globs to export applications from, in addition to the control plane namespace (Hanzo CD namespace). "+
"By default, all applications from the control plane namespace are always exported. "+
"If this flag is provided, applications from the specified namespaces are exported along with the control plane namespace. "+
"If not specified, the value from '%s' in %s is used (if defined in the ConfigMap). "+
"If the ConfigMap value is not set, only applications from the control plane namespace are exported.",
applicationNamespacesCmdParamsKey, common.ArgoCDCmdParamsConfigMapName))
command.Flags().StringSliceVarP(&applicationsetNamespaces, "applicationset-namespaces", "", []string{}, fmt.Sprintf("Comma-separated list of namespace globs to export ApplicationSets from, in addition to the control plane namespace (Argo CD namespace). "+
command.Flags().StringSliceVarP(&applicationsetNamespaces, "applicationset-namespaces", "", []string{}, fmt.Sprintf("Comma-separated list of namespace globs to export ApplicationSets from, in addition to the control plane namespace (Hanzo CD namespace). "+
"By default, all ApplicationSets from the control plane namespace are always exported. "+
"If this flag is provided, ApplicationSets from the specified namespaces are exported along with the control plane namespace. "+
"If not specified, the value from '%s' in %s is used (if defined in the ConfigMap). "+
@@ -154,7 +154,7 @@ func NewExportCommand() *cobra.Command {
return &command
}
// NewImportCommand defines a new command for exporting Kubernetes and Argo CD resources.
// NewImportCommand defines a new command for exporting Kubernetes and Hanzo CD resources.
func NewImportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
@@ -171,7 +171,7 @@ func NewImportCommand() *cobra.Command {
)
command := cobra.Command{
Use: "import SOURCE",
Short: "Import Argo CD data from stdin (specify `-') or a file",
Short: "Import Hanzo CD data from stdin (specify `-') or a file",
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()
@@ -270,7 +270,7 @@ func NewImportCommand() *cobra.Command {
errors.CheckError(err)
for _, bakObj := range backupObjects {
gvk := bakObj.GroupVersionKind()
// For objects without namespace, assume they belong in ArgoCD namespace
// For objects without namespace, assume they belong in Hanzo CD namespace
if bakObj.GetNamespace() == "" {
bakObj.SetNamespace(namespace)
}
@@ -434,8 +434,8 @@ func NewImportCommand() *cobra.Command {
command.Flags().BoolVar(&verbose, "verbose", false, "Verbose output (versus only changed output)")
command.Flags().BoolVar(&stopOperation, "stop-operation", false, "Stop any existing operations")
command.Flags().StringVarP(&skipResourcesWithLabel, "skip-resources-with-label", "", "", "Skip importing resources based on the label e.g. '--skip-resources-with-label my-label/example.io=true'")
command.Flags().StringSliceVarP(&applicationNamespaces, "application-namespaces", "", []string{}, fmt.Sprintf("Comma separated list of namespace globs to which import of applications is allowed. If not provided, value from '%s' in %s will be used. If it's not defined, only applications without an explicit namespace will be imported to the Argo CD namespace", applicationNamespacesCmdParamsKey, common.ArgoCDCmdParamsConfigMapName))
command.Flags().StringSliceVarP(&applicationsetNamespaces, "applicationset-namespaces", "", []string{}, fmt.Sprintf("Comma separated list of namespace globs which import of applicationsets is allowed. If not provided, value from '%s' in %s will be used. If it's not defined, only applicationsets without an explicit namespace will be imported to the Argo CD namespace", applicationsetNamespacesCmdParamsKey, common.ArgoCDCmdParamsConfigMapName))
command.Flags().StringSliceVarP(&applicationNamespaces, "application-namespaces", "", []string{}, fmt.Sprintf("Comma separated list of namespace globs to which import of applications is allowed. If not provided, value from '%s' in %s will be used. If it's not defined, only applications without an explicit namespace will be imported to the Hanzo CD namespace", applicationNamespacesCmdParamsKey, common.ArgoCDCmdParamsConfigMapName))
command.Flags().StringSliceVarP(&applicationsetNamespaces, "applicationset-namespaces", "", []string{}, fmt.Sprintf("Comma separated list of namespace globs which import of applicationsets is allowed. If not provided, value from '%s' in %s will be used. If it's not defined, only applicationsets without an explicit namespace will be imported to the Hanzo CD namespace", applicationsetNamespacesCmdParamsKey, common.ArgoCDCmdParamsConfigMapName))
command.PersistentFlags().BoolVar(&promptsEnabled, "prompts-enabled", localconfig.GetPromptsEnabled(true), "Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default.")
return &command
}
+4 -4
View File
@@ -51,7 +51,7 @@ argocd admin cluster generate-spec my-cluster -o yaml
#Generate a kubeconfig for a cluster named "my-cluster" and display it in the console
argocd admin cluster kubeconfig my-cluster
#Print information namespaces which Argo CD manages in each cluster
#Print information namespaces which Hanzo CD manages in each cluster
argocd admin cluster namespaces my-cluster `,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
@@ -74,7 +74,7 @@ type ClusterWithInfo struct {
v1alpha1.Cluster
// Shard holds controller shard number that handles the cluster
Shard int
// Namespaces holds list of namespaces managed by Argo CD in the cluster
// Namespaces holds list of namespaces managed by Hanzo CD in the cluster
Namespaces []string
}
@@ -310,7 +310,7 @@ func NewClusterNamespacesCommand() *cobra.Command {
var clientConfig clientcmd.ClientConfig
command := cobra.Command{
Use: "namespaces",
Short: "Print information namespaces which Argo CD manages in each cluster.",
Short: "Print information namespaces which Hanzo CD manages in each cluster.",
Run: func(cmd *cobra.Command, _ []string) {
ctx := cmd.Context()
@@ -605,7 +605,7 @@ func NewGenClusterConfigCommand(pathOpts *clientcmd.PathOptions) *cobra.Command
clientConfig := clientcmd.NewDefaultClientConfig(*cfgAccess, &overrides)
conf, err := clientConfig.ClientConfig()
errors.CheckError(err)
// Seed a minimal in-memory Argo CD environment so settings retrieval succeeds
// Seed a minimal in-memory Hanzo CD environment so settings retrieval succeeds
argoCDCM := &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{Kind: "ConfigMap", APIVersion: "v1"},
ObjectMeta: metav1.ObjectMeta{
+5 -5
View File
@@ -48,7 +48,7 @@ func (ds *dashboard) Run(ctx context.Context, config *DashboardConfig) error {
if err != nil {
return fmt.Errorf("could not start dashboard: %w", err)
}
fmt.Printf("Argo CD UI is available at http://%s:%d\n", config.Address, config.Port)
fmt.Printf("Hanzo CD UI is available at http://%s:%d\n", config.Address, config.Port)
<-ctx.Done()
stop() // unregister the signal handler as soon as we receive a signal
println("signal received, shutting down dashboard")
@@ -63,18 +63,18 @@ func NewDashboardCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
config := &DashboardConfig{ClientOpts: clientOpts}
cmd := &cobra.Command{
Use: "dashboard",
Short: "Starts Argo CD Web UI locally",
Short: "Starts Hanzo CD Web UI locally",
Run: func(cmd *cobra.Command, _ []string) {
config.Context = initialize.RetrieveContextIfChanged(cmd.Flag("context"))
errors.CheckError(NewDashboard().Run(cmd.Context(), config))
},
Example: `# Start the Argo CD Web UI locally on the default port and address
Example: `# Start the Hanzo CD Web UI locally on the default port and address
$ argocd admin dashboard
# Start the Argo CD Web UI locally on a custom port and address
# Start the Hanzo CD Web UI locally on a custom port and address
$ argocd admin dashboard --port 8080 --address 127.0.0.1
# Start the Argo CD Web UI with GZip compression
# Start the Hanzo CD Web UI with GZip compression
$ argocd admin dashboard --redis-compress gzip
`,
}
@@ -15,12 +15,12 @@ import (
const initialPasswordSecretName = "argocd-initial-admin-secret"
// NewInitialPasswordCommand defines a new command to retrieve Argo CD initial password.
// NewInitialPasswordCommand defines a new command to retrieve Hanzo CD initial password.
func NewInitialPasswordCommand() *cobra.Command {
var clientConfig clientcmd.ClientConfig
command := cobra.Command{
Use: "initial-password",
Short: "Prints initial password to log in to Argo CD for the first time",
Short: "Prints initial password to log in to Hanzo CD for the first time",
Run: func(_ *cobra.Command, _ []string) {
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
+2 -2
View File
@@ -72,10 +72,10 @@ func NewNotificationsCommand() *cobra.Command {
}
argocdService, err = service.NewArgoCDService(kubernetes.NewForConfigOrDie(k8sCfg), dynamicClient, ns, repoClientset)
if err != nil {
log.Fatalf("Failed to initialize Argo CD service: %v", err)
log.Fatalf("Failed to initialize Hanzo CD service: %v", err)
}
})
toolsCommand.PersistentFlags().StringVar(&argocdRepoServer, "argocd-repo-server", common.DefaultRepoServerAddr, "Argo CD repo server address")
toolsCommand.PersistentFlags().StringVar(&argocdRepoServer, "argocd-repo-server", common.DefaultRepoServerAddr, "Hanzo CD repo server address")
toolsCommand.PersistentFlags().BoolVar(&argocdRepoServerPlaintext, "argocd-repo-server-plaintext", false, "Use a plaintext client (non-TLS) to connect to repository server")
toolsCommand.PersistentFlags().BoolVar(&argocdRepoServerStrictTLS, "argocd-repo-server-strict-tls", false, "Perform strict validation of TLS certificates when connecting to repo server")
if err := toolsCommand.PersistentFlags().MarkDeprecated("argocd-repo-server-strict-tls", "use --argocd-repo-server-ca-cert-path instead"); err != nil {
@@ -34,7 +34,7 @@ func generateRandomPassword() (string, error) {
return initialPassword, nil
}
// NewRedisInitialPasswordCommand defines a new command to ensure Argo CD Redis password secret exists.
// NewRedisInitialPasswordCommand defines a new command to ensure Hanzo CD Redis password secret exists.
func NewRedisInitialPasswordCommand() *cobra.Command {
var clientConfig clientcmd.ClientConfig
command := cobra.Command{
@@ -78,7 +78,7 @@ func NewRedisInitialPasswordCommand() *cobra.Command {
errors.CheckError(err)
}
fmt.Printf("Argo CD Redis secret state confirmed: secret name %s.\n", redisInitialCredentials)
fmt.Printf("Hanzo CD Redis secret state confirmed: secret name %s.\n", redisInitialCredentials)
secret, err = kubeClientset.CoreV1().Secrets(namespace).Get(context.Background(), redisInitialCredentials, metav1.GetOptions{})
errors.CheckError(err)
+1 -1
View File
@@ -153,7 +153,7 @@ argocd admin settings rbac can some:role create application 'default/app' --poli
# If --policy-file is not given, the ConfigMap 'argocd-rbac-cm' from K8s is
# used. You need to specify the argocd namespace, and make sure that your
# current Kubernetes context is pointing to the cluster Argo CD is running in
# current Kubernetes context is pointing to the cluster Hanzo CD is running in
argocd admin settings rbac can some:role create application 'default/app' --namespace argocd
# You can override a possibly configured default role
+3 -3
View File
@@ -32,13 +32,13 @@ func NewCertCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
c.HelpFunc()(c, args)
os.Exit(1)
},
Example: ` # Add a TLS certificate for cd.example.com to ArgoCD cert store from a file
Example: ` # Add a TLS certificate for cd.example.com to Hanzo CD cert store from a file
argocd cert add-tls --from ~/mycert.pem cd.example.com
# Add a TLS certificate for cd.example.com to ArgoCD via stdin
# Add a TLS certificate for cd.example.com to Hanzo CD via stdin
cat ~/mycert.pem | argocd cert add-tls cd.example.com
# Add SSH known host entries for cd.example.com to ArgoCD by scanning host
# Add SSH known host entries for cd.example.com to Hanzo CD by scanning host
ssh-keyscan cd.example.com | argocd cert add-ssh --batch
# List all known TLS certificates
+6 -6
View File
@@ -58,16 +58,16 @@ func NewClusterCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clientc
Example: ` # List all known clusters in JSON format:
argocd cluster list -o json
# Add a target cluster configuration to ArgoCD. The context must exist in your kubectl config:
# Add a target cluster configuration to Hanzo CD. The context must exist in your kubectl config:
argocd cluster add example-cluster
# Get specific details about a cluster in plain text (wide) format:
argocd cluster get example-cluster -o wide
# Remove a target cluster context from ArgoCD
# Remove a target cluster context from Hanzo CD
argocd cluster rm example-cluster
# Set a target cluster context from ArgoCD
# Set a target cluster context from Hanzo CD
argocd cluster set CLUSTER_NAME --name new-cluster-name --namespace '*'
argocd cluster set CLUSTER_NAME --name new-cluster-name --namespace namespace-one --namespace namespace-two`,
}
@@ -167,7 +167,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
contextName = clusterOpts.Name
}
clst := cmdutil.NewCluster(contextName, clusterOpts.Namespaces, clusterOpts.ClusterResources, conf, managerBearerToken, awsAuthConf, execProviderConf, labelsMap, annotationsMap)
// If --server-proxy-url was explicitly provided, override the proxy that the ArgoCD server will use to
// If --server-proxy-url was explicitly provided, override the proxy that the Hanzo CD server will use to
// reach this cluster. An explicit empty string means "no proxy", which is the common case when the local
// machine needs a proxy but the two clusters can reach each other directly.
err = applyServerProxyOverride(c.Flags().Changed("server-proxy-url"), clusterOpts.ServerProxyURL, clst)
@@ -208,7 +208,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
command.Flags().StringArrayVar(&labels, "label", nil, "Set metadata labels (e.g. --label key=value)")
command.Flags().StringArrayVar(&annotations, "annotation", nil, "Set metadata annotations (e.g. --annotation key=value)")
command.Flags().StringVar(&clusterOpts.ProxyUrl, "proxy-url", "", "use proxy to connect cluster")
command.Flags().StringVar(&clusterOpts.ServerProxyURL, "server-proxy-url", "", "use a different proxy URL (or \"\" for no proxy) for the ArgoCD server to connect to the cluster; if omitted the value from --proxy-url or the kubeconfig is used")
command.Flags().StringVar(&clusterOpts.ServerProxyURL, "server-proxy-url", "", "use a different proxy URL (or \"\" for no proxy) for the Hanzo CD server to connect to the cluster; if omitted the value from --proxy-url or the kubeconfig is used")
cmdutil.AddClusterFlags(command, &clusterOpts)
return command
}
@@ -558,7 +558,7 @@ argocd cluster list -o json --server <ARGOCD_SERVER_ADDRESS>
# List Clusters in YAML Format
argocd cluster list -o yaml --server <ARGOCD_SERVER_ADDRESS>
# List Clusters that have been added to your Argo CD
# List Clusters that have been added to your Hanzo CD
argocd cluster list -o server <ARGOCD_SERVER_ADDRESS>
`,
+1 -1
View File
@@ -229,7 +229,7 @@ $ argocd completion powershell > $HOME\Documents\PowerShell\argocd_completion.ps
Add the following lines to your powershell profile
$ # ArgoCD tab completion
$ # Hanzo CD tab completion
if (Test-Path "$HOME\Documents\PowerShell\argocd_completion.ps1") {
. "$HOME\Documents\PowerShell\argocd_completion.ps1"
}
+3 -3
View File
@@ -23,13 +23,13 @@ func NewContextCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
Use: "context [CONTEXT]",
Aliases: []string{"ctx"},
Short: "Switch between contexts",
Example: `# List Argo CD Contexts
Example: `# List Hanzo CD Contexts
argocd context
# Switch Argo CD context
# Switch Hanzo CD context
argocd context cd.argoproj.io
# Delete Argo CD context
# Delete Hanzo CD context
argocd context cd.argoproj.io --delete`,
Run: func(c *cobra.Command, args []string) {
localCfg, err := localconfig.ReadLocalConfig(clientOpts.ConfigPath)
+1 -1
View File
@@ -172,7 +172,7 @@ func testAPI(ctx context.Context, clientOpts *apiclient.ClientOptions) error {
return nil
}
// MaybeStartLocalServer allows executing command in a headless mode. If we're in core mode, starts the Argo CD API
// MaybeStartLocalServer allows executing command in a headless mode. If we're in core mode, starts the Hanzo CD API
// server on the fly and changes provided client options to use started API server port.
//
// If the clientOpts enables core mode, but the local config does not have core mode enabled, this function will
+1 -1
View File
@@ -17,7 +17,7 @@ func RetrieveContextIfChanged(contextFlag *pflag.Flag) string {
}
// InitCommand allows executing commands in a headless mode by internally
// initializing an Argo CD API server and updating client options to use
// initializing an Hanzo CD API server and updating client options to use
// the server's listening port.
func InitCommand(cmd *cobra.Command) *cobra.Command {
flags := pflag.NewFlagSet("tmp", pflag.ContinueOnError)
+4 -4
View File
@@ -49,12 +49,12 @@ func NewLoginCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
)
command := &cobra.Command{
Use: "login SERVER",
Short: "Log in to Argo CD",
Long: "Log in to Argo CD",
Example: `# Login to Argo CD using a username and password
Short: "Log in to Hanzo CD",
Long: "Log in to Hanzo CD",
Example: `# Login to Hanzo CD using a username and password
argocd login cd.argoproj.io
# Login to Argo CD using SSO
# Login to Hanzo CD using SSO
argocd login cd.argoproj.io --sso
# Configure direct access using Kubernetes API server
+4 -4
View File
@@ -25,10 +25,10 @@ import (
func NewLogoutCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
command := &cobra.Command{
Use: "logout CONTEXT",
Short: "Log out from Argo CD",
Long: "Log out from Argo CD",
Example: `# Logout from the active Argo CD context
# This can be helpful for security reasons or when you want to switch between different Argo CD contexts or accounts.
Short: "Log out from Hanzo CD",
Long: "Log out from Hanzo CD",
Example: `# Logout from the active Hanzo CD context
# This can be helpful for security reasons or when you want to switch between different Hanzo CD contexts or accounts.
argocd logout CONTEXT
# Logout from a specific context named 'cd.argoproj.io'
+2 -2
View File
@@ -33,7 +33,7 @@ func NewDefaultPluginHandler() *DefaultPluginHandler {
}
// HandleCommandExecutionError processes the error returned from executing the command.
// It handles both standard Argo CD commands and plugin commands. We don't require returning
// It handles both standard Hanzo CD commands and plugin commands. We don't require returning
// an error, but we are doing it to cover various test scenarios.
func (h *DefaultPluginHandler) HandleCommandExecutionError(err error, isArgocdCLI bool, args []string) (msg string, retErr error) {
// the log level needs to be setup manually here since the initConfig()
@@ -48,7 +48,7 @@ func (h *DefaultPluginHandler) HandleCommandExecutionError(err error, isArgocdCL
if isArgocdCLI && strings.Contains(err.Error(), "unknown command") {
pluginPath, pluginErr := h.handlePluginCommand(args[1:])
// IMP: If a plugin doesn't exist, the returned path will be empty along with nil error
// This means the command is neither a normal Argo CD Command nor a plugin.
// This means the command is neither a normal Hanzo CD Command nor a plugin.
if pluginErr != nil {
// If plugin handling fails, report the plugin error and exit
return fmt.Sprintf("Error: %v\n", pluginErr), pluginErr
+11 -11
View File
@@ -38,7 +38,7 @@ func NewCommand() *cobra.Command {
command := &cobra.Command{
Use: common.CommandCLI,
Short: "argocd controls an Argo CD server",
Short: "argocd controls an Hanzo CD server",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
@@ -71,29 +71,29 @@ func NewCommand() *cobra.Command {
defaultLocalConfigPath, err := localconfig.DefaultLocalConfigPath()
errors.CheckError(err)
command.PersistentFlags().StringVar(&clientOpts.ConfigPath, "config", config.GetFlag("config", defaultLocalConfigPath), "Path to Argo CD config")
command.PersistentFlags().StringVar(&clientOpts.ServerAddr, "server", config.GetFlag("server", env.StringFromEnv(common.EnvServer, "")), "Argo CD server address")
command.PersistentFlags().StringVar(&clientOpts.ConfigPath, "config", config.GetFlag("config", defaultLocalConfigPath), "Path to Hanzo CD config")
command.PersistentFlags().StringVar(&clientOpts.ServerAddr, "server", config.GetFlag("server", env.StringFromEnv(common.EnvServer, "")), "Hanzo CD server address")
command.PersistentFlags().BoolVar(&clientOpts.PlainText, "plaintext", config.GetBoolFlag("plaintext"), "Disable TLS")
command.PersistentFlags().BoolVar(&clientOpts.Insecure, "insecure", config.GetBoolFlag("insecure"), "Skip server certificate and domain verification")
command.PersistentFlags().StringVar(&clientOpts.CertFile, "server-crt", config.GetFlag("server-crt", ""), "Server certificate file")
command.PersistentFlags().StringVar(&clientOpts.ClientCertFile, "client-crt", config.GetFlag("client-crt", ""), "Client certificate file")
command.PersistentFlags().StringVar(&clientOpts.ClientCertKeyFile, "client-crt-key", config.GetFlag("client-crt-key", ""), "Client certificate key file")
command.PersistentFlags().StringVar(&clientOpts.AuthToken, "auth-token", config.GetFlag("auth-token", env.StringFromEnv(common.EnvAuthToken, "")), fmt.Sprintf("Authentication token; set this or the %s environment variable", common.EnvAuthToken))
command.PersistentFlags().BoolVar(&clientOpts.GRPCWeb, "grpc-web", config.GetBoolFlag("grpc-web"), "Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.")
command.PersistentFlags().StringVar(&clientOpts.GRPCWebRootPath, "grpc-web-root-path", config.GetFlag("grpc-web-root-path", ""), "Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root.")
command.PersistentFlags().BoolVar(&clientOpts.GRPCWeb, "grpc-web", config.GetBoolFlag("grpc-web"), "Enables gRPC-web protocol. Useful if Hanzo CD server is behind proxy which does not support HTTP2.")
command.PersistentFlags().StringVar(&clientOpts.GRPCWebRootPath, "grpc-web-root-path", config.GetFlag("grpc-web-root-path", ""), "Enables gRPC-web protocol. Useful if Hanzo CD server is behind proxy which does not support HTTP2. Set web root.")
command.PersistentFlags().StringVar(&cmdutil.LogFormat, "logformat", config.GetFlag("logformat", "json"), "Set the logging format. One of: json|text")
command.PersistentFlags().StringVar(&cmdutil.LogLevel, "loglevel", config.GetFlag("loglevel", "info"), "Set the logging level. One of: debug|info|warn|error")
command.PersistentFlags().StringSliceVarP(&clientOpts.Headers, "header", "H", config.GetStringSliceFlag("header", []string{}), "Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)")
command.PersistentFlags().StringSliceVarP(&clientOpts.Headers, "header", "H", config.GetStringSliceFlag("header", []string{}), "Sets additional header to all requests made by Hanzo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)")
command.PersistentFlags().BoolVar(&clientOpts.PortForward, "port-forward", config.GetBoolFlag("port-forward"), "Connect to a random argocd-server port using port forwarding")
command.PersistentFlags().StringVar(&clientOpts.PortForwardNamespace, "port-forward-namespace", config.GetFlag("port-forward-namespace", ""), "Namespace name which should be used for port forwarding")
command.PersistentFlags().IntVar(&clientOpts.HttpRetryMax, "http-retry-max", config.GetIntFlag("http-retry-max", 0), "Maximum number of retries to establish http connection to Argo CD server")
command.PersistentFlags().BoolVar(&clientOpts.Core, "core", config.GetBoolFlag("core"), "If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server")
command.PersistentFlags().IntVar(&clientOpts.HttpRetryMax, "http-retry-max", config.GetIntFlag("http-retry-max", 0), "Maximum number of retries to establish http connection to Hanzo CD server")
command.PersistentFlags().BoolVar(&clientOpts.Core, "core", config.GetBoolFlag("core"), "If set to true then CLI talks directly to Kubernetes instead of talking to Hanzo CD API server")
command.PersistentFlags().StringVar(&clientOpts.Context, "argocd-context", "", "The name of the Argo-CD server context to use")
command.PersistentFlags().StringVar(&clientOpts.ServerName, "server-name", env.StringFromEnv(common.EnvServerName, common.DefaultServerName), fmt.Sprintf("Name of the Argo CD API server; set this or the %s environment variable when the server's name label differs from the default, for example when installing via the Helm chart", common.EnvServerName))
command.PersistentFlags().StringVar(&clientOpts.AppControllerName, "controller-name", env.StringFromEnv(common.EnvAppControllerName, common.DefaultApplicationControllerName), fmt.Sprintf("Name of the Argo CD Application controller; set this or the %s environment variable when the controller's name label differs from the default, for example when installing via the Helm chart", common.EnvAppControllerName))
command.PersistentFlags().StringVar(&clientOpts.ServerName, "server-name", env.StringFromEnv(common.EnvServerName, common.DefaultServerName), fmt.Sprintf("Name of the Hanzo CD API server; set this or the %s environment variable when the server's name label differs from the default, for example when installing via the Helm chart", common.EnvServerName))
command.PersistentFlags().StringVar(&clientOpts.AppControllerName, "controller-name", env.StringFromEnv(common.EnvAppControllerName, common.DefaultApplicationControllerName), fmt.Sprintf("Name of the Hanzo CD Application controller; set this or the %s environment variable when the controller's name label differs from the default, for example when installing via the Helm chart", common.EnvAppControllerName))
command.PersistentFlags().StringVar(&clientOpts.RedisHaProxyName, "redis-haproxy-name", env.StringFromEnv(common.EnvRedisHaProxyName, common.DefaultRedisHaProxyName), fmt.Sprintf("Name of the Redis HA Proxy; set this or the %s environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart", common.EnvRedisHaProxyName))
command.PersistentFlags().StringVar(&clientOpts.RedisName, "redis-name", env.StringFromEnv(common.EnvRedisName, common.DefaultRedisName), fmt.Sprintf("Name of the Redis deployment; set this or the %s environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart", common.EnvRedisName))
command.PersistentFlags().StringVar(&clientOpts.RepoServerName, "repo-server-name", env.StringFromEnv(common.EnvRepoServerName, common.DefaultRepoServerName), fmt.Sprintf("Name of the Argo CD Repo server; set this or the %s environment variable when the server's name label differs from the default, for example when installing via the Helm chart", common.EnvRepoServerName))
command.PersistentFlags().StringVar(&clientOpts.RepoServerName, "repo-server-name", env.StringFromEnv(common.EnvRepoServerName, common.DefaultRepoServerName), fmt.Sprintf("Name of the Hanzo CD Repo server; set this or the %s environment variable when the server's name label differs from the default, for example when installing via the Helm chart", common.EnvRepoServerName))
command.PersistentFlags().StringVar(&clientOpts.RedisCompression, "redis-compress", env.StringFromEnv("REDIS_COMPRESSION", string(cache.RedisCompressionGZip)), "Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none)")
command.PersistentFlags().BoolVar(&clientOpts.PromptsEnabled, "prompts-enabled", localconfig.GetPromptsEnabled(true), "Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default.")
+3 -3
View File
@@ -173,14 +173,14 @@ type ClusterOptions struct {
ServerProxyURL string
}
// InClusterEndpoint returns true if ArgoCD should reference the in-cluster
// InClusterEndpoint returns true if Hanzo CD should reference the in-cluster
// endpoint when registering the target cluster.
func (o ClusterOptions) InClusterEndpoint() bool {
return o.InCluster || o.ClusterEndpoint == string(KubeInternalEndpoint)
}
func AddClusterFlags(command *cobra.Command, opts *ClusterOptions) {
command.Flags().BoolVar(&opts.InCluster, "in-cluster", false, "Indicates Argo CD resides inside this cluster and should connect using the internal k8s hostname (kubernetes.default.svc)")
command.Flags().BoolVar(&opts.InCluster, "in-cluster", false, "Indicates Hanzo CD resides inside this cluster and should connect using the internal k8s hostname (kubernetes.default.svc)")
command.Flags().StringVar(&opts.AwsClusterName, "aws-cluster-name", "", "AWS Cluster name if set then aws cli eks token command will be used to access cluster")
command.Flags().StringVar(&opts.AwsRoleArn, "aws-role-arn", "", "Optional AWS role arn. If set then AWS IAM Authenticator assumes a role to perform cluster operations instead of the default AWS credential provider chain.")
command.Flags().StringVar(&opts.AwsProfile, "aws-profile", "", "Optional AWS profile. If set then AWS IAM Authenticator uses this profile to perform cluster operations instead of the default AWS credential provider chain.")
@@ -189,7 +189,7 @@ func AddClusterFlags(command *cobra.Command, opts *ClusterOptions) {
command.Flags().StringVar(&opts.Name, "name", "", "Overwrite the cluster name")
command.Flags().StringVar(&opts.Project, "project", "", "project of the cluster")
command.Flags().Int64Var(&opts.Shard, "shard", -1, "Cluster shard number; inferred from hostname if not set")
command.Flags().StringVar(&opts.ExecProviderCommand, "exec-command", "", "Command to run to provide client credentials to the cluster. You may need to build a custom ArgoCD image to ensure the command is available at runtime.")
command.Flags().StringVar(&opts.ExecProviderCommand, "exec-command", "", "Command to run to provide client credentials to the cluster. You may need to build a custom Hanzo CD image to ensure the command is available at runtime.")
command.Flags().StringArrayVar(&opts.ExecProviderArgs, "exec-command-args", nil, "Arguments to supply to the --exec-command executable")
command.Flags().StringToStringVar(&opts.ExecProviderEnv, "exec-command-env", nil, "Environment vars to set when running the --exec-command executable")
command.Flags().StringVar(&opts.ExecProviderAPIVersion, "exec-command-api-version", "", "Preferred input version of the ExecInfo for the --exec-command executable")
@@ -217,7 +217,7 @@ func getAppProj(app *unstructured.Unstructured, appProjInformer cache.SharedInde
return proj
}
// Checks if the application SyncStatus has been refreshed by Argo CD after an operation has completed
// Checks if the application SyncStatus has been refreshed by Hanzo CD after an operation has completed
func isAppSyncStatusRefreshed(app *unstructured.Unstructured, logEntry *log.Entry) bool {
_, ok, err := unstructured.NestedMap(app.Object, "status", "operationState")
if !ok || err != nil {
+1 -1
View File
@@ -48,7 +48,7 @@ func (s *Server) UpdatePassword(ctx context.Context, q *account.UpdatePasswordRe
}
// check for permission is user is trying to change someone else's password
// assuming user is trying to update someone else if username is different or issuer is not Argo CD
// assuming user is trying to update someone else if username is different or issuer is not Hanzo CD
issuer := session.Iss(ctx)
if updatedUsername != username || issuer != session.SessionManagerClaimsIssuer {
if err := s.enf.EnforceErr(ctx.Value("claims"), rbac.ResourceAccounts, rbac.ActionUpdate, q.Name); err != nil {
+1 -1
View File
@@ -3,7 +3,7 @@ option go_package = "github.com/hanzoai/deploy/pkg/apiclient/account";
// Account Service
//
// Account Service API updates Argo CD account settings
// Account Service API updates Hanzo CD account settings
package account;
+3 -3
View File
@@ -2290,9 +2290,9 @@ func (s *Server) Rollback(ctx context.Context, rollbackReq *application.Applicat
}
if deploymentInfo.Source.IsZero() && deploymentInfo.Sources.IsZero() {
// Since source type was introduced to history starting with v0.12, and is now required for
// rollback, we cannot support rollback to revisions deployed using Argo CD v0.11 or below
// rollback, we cannot support rollback to revisions deployed using Hanzo CD v0.11 or below
// As multi source doesn't use app.Source, we need to check to the Sources length
return nil, status.Errorf(codes.FailedPrecondition, "cannot rollback to revision deployed with Argo CD v0.11 or lower. sync to revision instead.")
return nil, status.Errorf(codes.FailedPrecondition, "cannot rollback to revision deployed with Hanzo CD v0.11 or lower. sync to revision instead.")
}
var syncOptions v1alpha1.SyncOptions
@@ -2988,7 +2988,7 @@ func (s *Server) ServerSideDiff(ctx context.Context, q *application.ApplicationS
argoSettings, err := s.settingsMgr.GetSettings()
if err != nil {
return nil, fmt.Errorf("error getting ArgoCD settings: %w", err)
return nil, fmt.Errorf("error getting Hanzo CD settings: %w", err)
}
resourceOverrides, err := s.settingsMgr.GetResourceOverrides()
+1 -1
View File
@@ -537,7 +537,7 @@ func (s *Server) validateAppSet(appset *v1alpha1.ApplicationSet) (string, error)
projectName := appset.Spec.Template.Spec.Project
if strings.Contains(projectName, "{{") {
return "", errors.New("the Argo CD API does not currently support creating ApplicationSets with templated `project` fields")
return "", errors.New("the Hanzo CD API does not currently support creating ApplicationSets with templated `project` fields")
}
if err := appsetutils.CheckInvalidGenerators(appset); err != nil {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
)
// K8sEventListToAPIEventList converts a Kubernetes EventList into the typed
// Argo CD events API representation. A nil input is mapped to an empty list so
// Hanzo CD events API representation. A nil input is mapped to an empty list so
// callers can return the result directly without a nil-check.
func K8sEventListToAPIEventList(in *corev1.EventList) *eventspb.EventList {
if in == nil {
+4 -4
View File
@@ -4,14 +4,14 @@ option go_package = "github.com/hanzoai/deploy/pkg/apiclient/events";
// Events Service
//
// Events Service API performs query actions against Kubernetes core/v1 Event
// resources owned by Argo CD applications, application sets and projects.
// resources owned by Hanzo CD applications, application sets and projects.
package events;
import "gogoproto/gogo.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
// EventList is a list of Argo CD Event messages. It mirrors corev1.EventList
// field-for-field but is defined in Argo CD's apiclient package to avoid
// EventList is a list of Hanzo CD Event messages. It mirrors corev1.EventList
// field-for-field but is defined in Hanzo CD's apiclient package to avoid
// pulling Kubernetes protobuf types into the public gRPC surface.
message EventList {
// Standard list metadata.
@@ -20,7 +20,7 @@ message EventList {
repeated Event items = 2 [(gogoproto.nullable) = false];
}
// Event mirrors corev1.Event and exposes the fields consumed by the Argo CD
// Event mirrors corev1.Event and exposes the fields consumed by the Hanzo CD
// API and UI. Event is a report of an event somewhere in the cluster. Events
// have a limited retention time and triggers and messages may evolve with
// time. Event consumers should not rely on the timing of an event with a
+19 -19
View File
@@ -56,7 +56,7 @@ const (
HeaderArgoCDProjectName = "Argocd-Project-Name"
// HeaderArgoCDTargetClusterURL defines the target cluster URL
// that the Argo CD application is associated with. This header
// that the Hanzo CD application is associated with. This header
// will be populated by the extension proxy and passed to the
// configured backend service. If this header is passed by
// the client, its value will be overridden by the extension
@@ -67,7 +67,7 @@ const (
HeaderArgoCDTargetClusterURL = "Argocd-Target-Cluster-URL"
// HeaderArgoCDTargetClusterName defines the target cluster name
// that the Argo CD application is associated with. This header
// that the Hanzo CD application is associated with. This header
// will be populated by the extension proxy and passed to the
// configured backend service. If this header is passed by
// the client, its value will be overridden by the extension
@@ -75,28 +75,28 @@ const (
HeaderArgoCDTargetClusterName = "Argocd-Target-Cluster-Name"
// HeaderArgoCDUsername is the header name that defines the username of the logged
// in user authenticated by Argo CD.
// in user authenticated by Hanzo CD.
HeaderArgoCDUsername = "Argocd-Username"
// HeaderArgoCDUserId is the header name that defines the internal user id of the logged
// in user authenticated by Argo CD.
// in user authenticated by Hanzo CD.
HeaderArgoCDUserId = "Argocd-User-Id"
// HeaderArgoCDGroups is the header name that provides the 'groups'
// claim from the users authenticated in Argo CD.
// claim from the users authenticated in Hanzo CD.
HeaderArgoCDGroups = "Argocd-User-Groups"
)
// RequestResources defines the authorization scope for
// an incoming request to a given extension. This struct
// is populated from pre-defined Argo CD headers.
// is populated from pre-defined Hanzo CD headers.
type RequestResources struct {
ApplicationName string
ApplicationNamespace string
ProjectName string
}
// ValidateHeaders will validate the pre-defined Argo CD
// ValidateHeaders will validate the pre-defined Hanzo CD
// request headers for extensions and extract the resources
// information populating and returning a RequestResources
// object.
@@ -145,7 +145,7 @@ func getAppName(appHeader string) (string, string, error) {
}
// ExtensionConfigs defines the configurations for all extensions
// retrieved from Argo CD configmap (argocd-cm).
// retrieved from Hanzo CD configmap (argocd-cm).
type ExtensionConfigs struct {
Extensions []ExtensionConfig `yaml:"extensions"`
}
@@ -160,7 +160,7 @@ type ExtensionConfig struct {
// BackendConfig defines the backend service configurations that will
// be used by an specific extension. An extension can have multiple services
// associated. This is necessary when Argo CD is managing applications in
// associated. This is necessary when Hanzo CD is managing applications in
// external clusters. In this case, each cluster may have its own backend
// service.
type BackendConfig struct {
@@ -190,7 +190,7 @@ type Header struct {
// a header is provided.
Name string `yaml:"name"`
// Value defines the value of the header. The actual value can be
// provided as verbatim or as a reference to an Argo CD secret key.
// provided as verbatim or as a reference to an Hanzo CD secret key.
// In order to provide it as a reference, it is necessary to prefix
// it with a dollar sign.
// Example:
@@ -208,7 +208,7 @@ type ClusterConfig struct {
Name string `yaml:"name"`
}
// ProxyConfig allows configuring connection behaviour between Argo CD
// ProxyConfig allows configuring connection behaviour between Hanzo CD
// API Server and the backend service.
type ProxyConfig struct {
// ConnectionTimeout is the maximum amount of time a dial to
@@ -234,7 +234,7 @@ type ProxyConfig struct {
MaxIdleConnections int `yaml:"maxIdleConnections"`
}
// SettingsGetter defines the contract to retrieve Argo CD Settings.
// SettingsGetter defines the contract to retrieve Hanzo CD Settings.
type SettingsGetter interface {
Get() (*settings.ArgoCDSettings, error)
}
@@ -251,12 +251,12 @@ func NewDefaultSettingsGetter(mgr *settings.SettingsManager) *DefaultSettingsGet
}
}
// Get will retrieve the Argo CD settings.
// Get will retrieve the Hanzo CD settings.
func (s *DefaultSettingsGetter) Get() (*settings.ArgoCDSettings, error) {
return s.settingsMgr.GetSettings()
}
// ProjectGetter defines the contract to retrieve Argo CD Project.
// ProjectGetter defines the contract to retrieve Hanzo CD Project.
type ProjectGetter interface {
Get(name string) (*v1alpha1.AppProject, error)
GetClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error)
@@ -362,14 +362,14 @@ type Manager struct {
userGetter UserGetter
}
// ExtensionMetricsRegistry exposes operations to update http metrics in the Argo CD
// ExtensionMetricsRegistry exposes operations to update http metrics in the Hanzo CD
// API server.
type ExtensionMetricsRegistry interface {
// IncExtensionRequestCounter will increase the request counter for the given
// extension with the given status.
IncExtensionRequestCounter(extension string, status int)
// ObserveExtensionRequestDuration will register the request roundtrip duration
// between Argo CD API Server and the extension backend service for the given
// between Hanzo CD API Server and the extension backend service for the given
// extension.
ObserveExtensionRequestDuration(extension string, duration time.Duration)
}
@@ -390,7 +390,7 @@ func NewManager(log *log.Entry, namespace string, sg SettingsGetter, ag Applicat
// ExtensionRegistry is an in memory registry that contains contains all
// proxies for all extensions. The key is the extension name defined in
// the Argo CD configmap.
// the Hanzo CD configmap.
type ExtensionRegistry map[string]ProxyRegistry
// ProxyRegistry is an in memory registry that contains all proxies for a
@@ -826,13 +826,13 @@ func registerMetrics(extName string, metrics httpsnoop.Metrics, extensionMetrics
}
// prepareRequest is responsible for cleaning the incoming request URL removing
// the Argo CD extension API section from it. It provides additional information to
// the Hanzo CD extension API section from it. It provides additional information to
// the backend service appending them in the outgoing request headers. The appended
// headers are:
// - Control plane namespace
// - Cluster destination name
// - Cluster destination server
// - Argo CD authenticated username
// - Hanzo CD authenticated username
func prepareRequest(r *http.Request, namespace string, extName string, app *v1alpha1.Application, userId string, username string, groups []string) {
r.URL.Path = strings.TrimPrefix(r.URL.Path, fmt.Sprintf("%s/%s", URLPrefix, extName))
r.Header.Set(HeaderArgoCDNamespace, namespace)
+4 -4
View File
@@ -46,7 +46,7 @@ func constructLogoutURL(logoutURL, token, logoutRedirectURL string) string {
return logoutRedirectURLPattern.ReplaceAllString(constructedLogoutURL, logoutRedirectURL)
}
// ServeHTTP is the logout handler for ArgoCD and constructs OIDC logout URL and redirects to it for OIDC issued sessions,
// ServeHTTP is the logout handler for Hanzo CD and constructs OIDC logout URL and redirects to it for OIDC issued sessions,
// and redirects user to '/login' for argocd issued sessions
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
var tokenString string
@@ -60,7 +60,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
argoURL, err := argoCDSettings.ArgoURLForRequest(r)
if err != nil {
log.Warnf("unable to find ArgoCD URL from config: %v", err)
log.Warnf("unable to find Hanzo CD URL from config: %v", err)
}
if argoURL == "" {
// golang does not provide any easy way to determine scheme of current request
@@ -75,11 +75,11 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
tokenString, err = httputil.JoinCookies(common.AuthCookieName, cookies)
// Build message safely: only include err when non-nil
if err != nil {
http.Error(w, "Failed to retrieve ArgoCD auth token: "+err.Error(), http.StatusBadRequest)
http.Error(w, "Failed to retrieve Hanzo CD auth token: "+err.Error(), http.StatusBadRequest)
return
}
if tokenString == "" {
http.Error(w, "Failed to retrieve ArgoCD auth token", http.StatusBadRequest)
http.Error(w, "Failed to retrieve Hanzo CD auth token", http.StatusBadRequest)
return
}
+3 -3
View File
@@ -50,7 +50,7 @@ var (
extensionRequestDuration = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "argocd_proxy_extension_request_duration_seconds",
Help: "Request duration in seconds between the Argo CD API server and the extension backend.",
Help: "Request duration in seconds between the Hanzo CD API server and the extension backend.",
Buckets: []float64{0.1, 0.25, .5, 1, 2, 5, 10},
},
[]string{"extension"},
@@ -58,14 +58,14 @@ var (
loginRequestCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "argocd_login_request_total",
Help: "Number of login requests to the Argo CD API server.",
Help: "Number of login requests to the Hanzo CD API server.",
},
[]string{"status"},
)
argoVersion = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "argocd_info",
Help: "ArgoCD version information",
Help: "Hanzo CD version information",
},
[]string{"version"},
)
+1 -1
View File
@@ -39,7 +39,7 @@ import (
)
const (
// JWTTokenSubFormat format of the JWT token subject that Argo CD vends out.
// JWTTokenSubFormat format of the JWT token subject that Hanzo CD vends out.
JWTTokenSubFormat = "proj:%s:%s"
)
+2 -2
View File
@@ -21,7 +21,7 @@ type RBACPolicyEnforcer struct {
scopes []string
}
// NewRBACPolicyEnforcer returns a new RBAC Enforcer for the Argo CD API Server
// NewRBACPolicyEnforcer returns a new RBAC Enforcer for the Hanzo CD API Server
func NewRBACPolicyEnforcer(enf *rbac.Enforcer, projLister applister.AppProjectNamespaceLister) *RBACPolicyEnforcer {
return &RBACPolicyEnforcer{
enf: enf,
@@ -55,7 +55,7 @@ func GetProjectRoleFromSubject(subject string) (string, string, bool) {
return "", "", false
}
// EnforceClaims is an RBAC claims enforcer specific to the Argo CD API server
// EnforceClaims is an RBAC claims enforcer specific to the Hanzo CD API server
func (p *RBACPolicyEnforcer) EnforceClaims(claims jwt.Claims, rvals ...any) bool {
mapClaims, err := jwtutil.MapClaims(claims)
if err != nil {
+8 -8
View File
@@ -183,7 +183,7 @@ func init() {
settings_util.ConfigureGoClientFeatures()
}
// ArgoCDServer is the API server for Argo CD
// ArgoCDServer is the API server for Hanzo CD
type ArgoCDServer struct {
ArgoCDServerOpts
ApplicationSetOpts
@@ -203,7 +203,7 @@ type ArgoCDServer struct {
appsetLister applisters.ApplicationSetLister
db db.ArgoDB
// stopCh is the channel which when closed, will shutdown the Argo CD server
// stopCh is the channel which when closed, will shutdown the Hanzo CD server
stopCh chan os.Signal
userStateStorage util_session.UserStateStorage
indexDataInit gosync.Once
@@ -267,14 +267,14 @@ type ApplicationSetOpts struct {
// GracefulRestartSignal implements a signal to be used for a graceful restart trigger.
type GracefulRestartSignal struct{}
// HTTPMetricsRegistry exposes operations to update http metrics in the Argo CD
// HTTPMetricsRegistry exposes operations to update http metrics in the Hanzo CD
// API server.
type HTTPMetricsRegistry interface {
// IncExtensionRequestCounter will increase the request counter for the given
// extension with the given status.
IncExtensionRequestCounter(extension string, status int)
// ObserveExtensionRequestDuration will register the request roundtrip duration
// between Argo CD API Server and the extension backend service for the given
// between Hanzo CD API Server and the extension backend service for the given
// extension.
ObserveExtensionRequestDuration(extension string, duration time.Duration)
}
@@ -308,7 +308,7 @@ func initializeDefaultProject(opts ArgoCDServerOpts) error {
return err
}
// NewServer returns a new instance of the Argo CD API server
// NewServer returns a new instance of the Hanzo CD API server
func NewServer(ctx context.Context, opts ArgoCDServerOpts, appsetOpts ApplicationSetOpts) *ArgoCDServer {
settingsMgr := settings_util.NewSettingsManager(ctx, opts.KubeClientset, opts.Namespace)
settings, err := settingsMgr.InitializeSettings(opts.Insecure)
@@ -500,7 +500,7 @@ func (server *ArgoCDServer) logInClusterWarnings() error {
}
if !inClusterEnabled {
for _, clusterName := range inClusterNames {
log.Warnf("cluster %q uses in-cluster server address but it's disabled in Argo CD settings", clusterName)
log.Warnf("cluster %q uses in-cluster server address but it's disabled in Hanzo CD settings", clusterName)
}
}
}
@@ -1201,7 +1201,7 @@ func (server *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWeb
}
// withTracingHandler is a middleware that extracts OpenTelemetry trace context from HTTP headers
// and injects it into the request context. This enables trace context propagation from HTTP clients
// to gRPC services, allowing for better distributed tracing across the ArgoCD server.
// to gRPC services, allowing for better distributed tracing across the Hanzo CD server.
withTracingHandler := func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
propagator := otel.GetTextMapPropagator()
@@ -1480,7 +1480,7 @@ func (server *ArgoCDServer) newStaticAssetsHandler() func(http.ResponseWriter, *
w.Header().Set("Content-Security-Policy", server.ContentSecurityPolicy)
}
w.Header().Set("X-XSS-Protection", "1")
// Prevent search engines from indexing the Argo CD UI.
// Prevent search engines from indexing the Hanzo CD UI.
w.Header().Set("X-Robots-Tag", "noindex, nofollow")
// serve index.html for non file requests to support HTML5 History API
+1 -1
View File
@@ -39,7 +39,7 @@ func NewServer(mgr *sessionmgr.SessionManager, settingsMgr *settings.SettingsMan
return &Server{mgr, settingsMgr, authenticator, policyEnf, rateLimiter}
}
// Create generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user
// Create generates a JWT token signed by Hanzo CD intended for web/CLI logins of the admin user
// using username/password
func (s *Server) Create(_ context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error) {
if s.limitLoginAttempts != nil {
+1 -1
View File
@@ -37,7 +37,7 @@ func NewServer(mgr *settings.SettingsManager, repoClient apiclient.Clientset, au
return &Server{mgr: mgr, repoClient: repoClient, authenticator: authenticator, disableAuth: disableAuth, appsInAnyNamespaceEnabled: appsInAnyNamespaceEnabled, hydratorEnabled: hydratorEnabled, syncWithReplaceAllowed: syncWithReplaceAllowed}
}
// Get returns Argo CD settings
// Get returns Hanzo CD settings
func (s *Server) Get(ctx context.Context, _ *settingspkg.SettingsQuery) (*settingspkg.Settings, error) {
resourceOverrides, err := s.mgr.GetResourceOverrides()
if err != nil {
+4 -4
View File
@@ -3,7 +3,7 @@ option go_package = "github.com/hanzoai/deploy/pkg/apiclient/settings";
// Settings Service
//
// Settings Service API retrieves Argo CD settings
// Settings Service API retrieves Hanzo CD settings
package cluster;
import "gogoproto/gogo.proto";
@@ -11,7 +11,7 @@ import "google/api/annotations.proto";
import "github.com/hanzoai/deploy/pkg/apis/application/v1alpha1/generated.proto";
import "github.com/hanzoai/deploy/server/settings/oidc/claims.proto";
// SettingsQuery is a query for Argo CD settings
// SettingsQuery is a query for Hanzo CD settings
message SettingsQuery {
}
@@ -97,12 +97,12 @@ message OIDCConfig {
// SettingsService
service SettingsService {
// Get returns Argo CD settings
// Get returns Hanzo CD settings
rpc Get(SettingsQuery) returns (Settings) {
option (google.api.http).get = "/api/v1/settings";
}
// Get returns Argo CD plugins
// Get returns Hanzo CD plugins
rpc GetPlugins(SettingsQuery) returns (SettingsPluginsResponse) {
option (google.api.http).get = "/api/v1/settings/plugins";
}
+1 -1
View File
@@ -9,7 +9,7 @@ package version;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
// VersionMessage represents version of the Argo CD API server
// VersionMessage represents version of the Hanzo CD API server
message VersionMessage {
string Version = 1;
string BuildDate = 2;
+1 -1
View File
@@ -265,7 +265,7 @@ export class App extends React.Component<
// argo-ui's AppContext requires a `router`, but this provider sits above <Router> so there is no
// route match yet — supply the current location with an empty match. The only fields argo-ui actually
// reads off this context are `apis` (DataLoader) and `router` (NavBar, unused in Argo CD).
// reads off this context are `apis` (DataLoader) and `router` (NavBar, unused in Hanzo CD).
const appContext: AppContext = {
history,
apis: {popup: this.popupManager, notifications: this.notificationsManager},
@@ -70,12 +70,12 @@ const AutoSyncFormField = ReactFormField((props: {fieldApi: FieldApi; className:
<div className='checkbox-container'>
<Checkbox onChange={val => setValue({...automated, prune: val})} checked={!!automated.prune} id='policyPrune' />
<label htmlFor='policyPrune'>Prune Resources</label>
<HelpIcon title='If checked, Argo will delete resources if they are no longer defined in Git' />
<HelpIcon title='If checked, Hanzo CD will delete resources if they are no longer defined in Git' />
</div>
<div className='checkbox-container'>
<Checkbox onChange={val => setValue({...automated, selfHeal: val})} checked={!!automated.selfHeal} id='policySelfHeal' />
<label htmlFor='policySelfHeal'>Self Heal</label>
<HelpIcon title='If checked, Argo will force the state defined in Git into the cluster when a deviation in the cluster is detected' />
<HelpIcon title='If checked, Hanzo CD will force the state defined in Git into the cluster when a deviation in the cluster is detected' />
</div>
</div>
)}
+1 -1
View File
@@ -419,7 +419,7 @@ const deletePodAction = async (ctx: ContextApis, pod: appModels.ResourceNode, ap
<div className='argo-form-row' style={{paddingLeft: '30px'}}>
<CheckboxField id='force-delete-checkbox' field='force' />
<label htmlFor='force-delete-checkbox'>Force delete</label>
<HelpIcon title='If checked, Argo will ignore any configured grace period and delete the resource immediately' />
<HelpIcon title='If checked, Hanzo CD will ignore any configured grace period and delete the resource immediately' />
</div>
</div>
),
+1 -1
View File
@@ -37,7 +37,7 @@ export const Help = () => {
<div className='columns large-4 small-6'>
<div className='help-box'>
<p>New to Hanzo CD?</p>
<a className='user-info-panel-buttons argo-button argo-button--base' href='https://argo-cd.readthedocs.io'>
<a className='user-info-panel-buttons argo-button argo-button--base' href='https://docs.hanzo.ai'>
Read the docs
</a>
</div>
+1 -1
View File
@@ -157,7 +157,7 @@ $logoNegativePath: 'assets/images/hanzo-logo-white.svg';
&--argo{
height: 5rem;
background-size: contain;
background-image: url(assets/images/Argo.svg);
background-image: url(assets/images/hanzo-logo-white.svg);
background-repeat: no-repeat;
float: left;
width: 4rem;
@@ -131,7 +131,7 @@ export const ClustersList = () => {
<i className='fa fa-info-circle' />
<span>
Refer to CLI{' '}
<a href='https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-management/#adding-a-cluster' target='_blank' rel='noopener noreferrer'>
<a href='https://docs.hanzo.ai/en/stable/operator-manual/cluster-management/#adding-a-cluster' target='_blank' rel='noopener noreferrer'>
<i className='fa fa-external-link-alt' /> Documentation
</a>{' '}
for adding clusters.
+1 -1
View File
@@ -39,7 +39,7 @@ export function isValidURL(url: string): boolean {
}
}
// managed-by-url is expected to mostly if not always point to another Argo CD instance URL,
// managed-by-url is expected to mostly if not always point to another Hanzo CD instance URL,
// so we only consider http/https valid for click-through behavior.
export function isValidManagedByURL(url: string): boolean {
try {
+1 -1
View File
@@ -66,7 +66,7 @@ export const Sidebar = (props: SidebarProps) => {
</div>
</div>
)}
<img onClick={() => context.history.push('/')} title={'Go to start page'} src='assets/images/logo.png' alt='Argo' className='sidebar__logo__character' />{' '}
<img onClick={() => context.history.push('/')} title={'Go to start page'} src='assets/images/hanzo-logo-white.svg' alt='Hanzo CD' className='sidebar__logo__character' />{' '}
</div>
<nav aria-label='Main'>