mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
fix: API group back to apps.hanzo.ai, the group the cluster actually serves
main declared Group = "cd.hanzo.ai" while every CRD, all four Applications and every tracked object in hanzo-k8s are on apps.hanzo.ai. There are no cd.hanzo.ai CRDs anywhere, so a build from main binds nothing: the controller comes up healthy, watches a group with no resources, and silently stops reconciling the fleet. The deployed image (sha-e1b9244, all three components) is the only reason this has not fired. The rename reached further than the group. common.go:215 moved the ownership annotation to cd.hanzo.ai/tracking-id while live objects carry apps.hanzo.ai/tracking-id, and the finalizers moved too (resources-finalizer.cd.hanzo.ai), which would leave existing objects holding finalizers no running controller removes. Renaming a CRD group plus the ownership annotation plus the finalizers is a data migration over every managed object, not a source edit — shipping it as an edit is the defect. Reverting restores the property that was lost: main is deployable at any time. Mitigating only by luck: prune is false on all three automated Applications, so the failure mode is "GitOps stops" rather than "GitOps deletes". Not a design. Verified: no occurrence was a hostname (checked for the argocd.hanzo.ai-style substring trap; none), 29 files, zero residual, register.go now byte-identical to the deployed baseline. go build ./... exits 0. TestGetGlobalProjects and TestGetAppOfAppSummary fail identically on unmodified origin/main — pre-existing, not from this change. If cd.hanzo.ai is still wanted, it needs CRD install, object conversion, annotation and finalizer rewrite across every tracked resource, and RBAC — executed deliberately, not carried in a source constant. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -169,7 +169,7 @@ func NewCommand() *cobra.Command {
|
||||
Cache: cacheOpt,
|
||||
HealthProbeBindAddress: probeBindAddr,
|
||||
LeaderElection: enableLeaderElection,
|
||||
LeaderElectionID: "58ac56fa.applicationsets.cd.hanzo.ai",
|
||||
LeaderElectionID: "58ac56fa.applicationsets.apps.hanzo.ai",
|
||||
Client: ctrlclient.Options{
|
||||
DryRun: &dryRun,
|
||||
},
|
||||
|
||||
+14
-14
@@ -191,13 +191,13 @@ const (
|
||||
// LabelKeyAppName is the label key to use to uniquely identify the name of the Kubernetes application
|
||||
LabelKeyAppName = "app.kubernetes.io/name"
|
||||
// LabelKeyAutoLabelClusterInfo if set to true will automatically add extra labels from the cluster info (currently it only adds a k8s version label)
|
||||
LabelKeyAutoLabelClusterInfo = "cd.hanzo.ai/auto-label-cluster-info"
|
||||
LabelKeyAutoLabelClusterInfo = "apps.hanzo.ai/auto-label-cluster-info"
|
||||
// LabelKeyLegacyApplicationName is the legacy label (v0.10 and below) and is superseded by 'app.kubernetes.io/instance'
|
||||
LabelKeyLegacyApplicationName = "applications.argoproj.io/app-name"
|
||||
// LabelKeySecretType contains the type of argocd secret (currently: 'cluster', 'repository', 'repo-config' or 'repo-creds')
|
||||
LabelKeySecretType = "cd.hanzo.ai/secret-type"
|
||||
LabelKeySecretType = "apps.hanzo.ai/secret-type"
|
||||
// LabelKeyClusterKubernetesVersion contains the kubernetes version of the cluster secret if it has been enabled
|
||||
LabelKeyClusterKubernetesVersion = "cd.hanzo.ai/kubernetes-version"
|
||||
LabelKeyClusterKubernetesVersion = "apps.hanzo.ai/kubernetes-version"
|
||||
// LabelValueSecretTypeCluster indicates a secret type of cluster
|
||||
LabelValueSecretTypeCluster = "cluster"
|
||||
// LabelValueSecretTypeRepository indicates a secret type of repository
|
||||
@@ -212,41 +212,41 @@ const (
|
||||
LabelValueSecretTypeSCMCreds = "scm-creds"
|
||||
|
||||
// AnnotationKeyAppInstance is the Argo CD application name is used as the instance name
|
||||
AnnotationKeyAppInstance = "cd.hanzo.ai/tracking-id"
|
||||
AnnotationInstallationID = "cd.hanzo.ai/installation-id"
|
||||
AnnotationKeyAppInstance = "apps.hanzo.ai/tracking-id"
|
||||
AnnotationInstallationID = "apps.hanzo.ai/installation-id"
|
||||
|
||||
// AnnotationCompareOptions is a comma-separated list of options for comparison
|
||||
AnnotationCompareOptions = "cd.hanzo.ai/compare-options"
|
||||
AnnotationCompareOptions = "apps.hanzo.ai/compare-options"
|
||||
|
||||
// AnnotationClientSideApplyMigrationManager specifies a custom field manager for client-side apply migration
|
||||
AnnotationClientSideApplyMigrationManager = "cd.hanzo.ai/client-side-apply-migration-manager"
|
||||
AnnotationClientSideApplyMigrationManager = "apps.hanzo.ai/client-side-apply-migration-manager"
|
||||
|
||||
// AnnotationIgnoreHealthCheck when set on an Application's immediate child indicates that its health check
|
||||
// can be disregarded.
|
||||
AnnotationIgnoreHealthCheck = "cd.hanzo.ai/ignore-healthcheck"
|
||||
AnnotationIgnoreHealthCheck = "apps.hanzo.ai/ignore-healthcheck"
|
||||
|
||||
// AnnotationKeyManagedBy is annotation name which indicates that k8s resource is managed by an application.
|
||||
AnnotationKeyManagedBy = "managed-by"
|
||||
// AnnotationValueManagedByArgoCD is a 'managed-by' annotation value for resources managed by Argo CD
|
||||
AnnotationValueManagedByArgoCD = "cd.hanzo.ai"
|
||||
AnnotationValueManagedByArgoCD = "apps.hanzo.ai"
|
||||
|
||||
// AnnotationKeyLinkPrefix tells the UI to add an external link icon to the application node
|
||||
// that links to the value given in the annotation.
|
||||
// The annotation key must be followed by a unique identifier. Ex: link.cd.hanzo.ai/dashboard
|
||||
// The annotation key must be followed by a unique identifier. Ex: link.apps.hanzo.ai/dashboard
|
||||
// It's valid to have multiple annotations that match the prefix.
|
||||
// Values can simply be a url or they can have
|
||||
// an optional link title separated by a "|"
|
||||
// Ex: "http://grafana.example.com/d/yu5UH4MMz/deployments"
|
||||
// Ex: "Go to Dashboard|http://grafana.example.com/d/yu5UH4MMz/deployments"
|
||||
AnnotationKeyLinkPrefix = "link.cd.hanzo.ai/"
|
||||
AnnotationKeyLinkPrefix = "link.apps.hanzo.ai/"
|
||||
// AnnotationKeyIgnoreDefaultLinks tells the Application to not add autogenerated links from this object into its externalURLs
|
||||
// This applies to ingress objects and takes effect if set to "true"
|
||||
// This only disables the default behavior of generating links based on the ingress spec, and does not disable AnnotationKeyLinkPrefix
|
||||
AnnotationKeyIgnoreDefaultLinks = "cd.hanzo.ai/ignore-default-links"
|
||||
AnnotationKeyIgnoreDefaultLinks = "apps.hanzo.ai/ignore-default-links"
|
||||
|
||||
// AnnotationKeyAppSkipReconcile tells the Application to skip the Application controller reconcile.
|
||||
// Skip reconcile when the value is "true" or any other string values that can be strconv.ParseBool() to be true.
|
||||
AnnotationKeyAppSkipReconcile = "cd.hanzo.ai/skip-reconcile"
|
||||
AnnotationKeyAppSkipReconcile = "apps.hanzo.ai/skip-reconcile"
|
||||
|
||||
// LabelKeyComponentRepoServer is the label key to identify the component as repo-server
|
||||
LabelKeyComponentRepoServer = "app.kubernetes.io/component"
|
||||
@@ -442,7 +442,7 @@ func GetCMPWorkDir() string {
|
||||
|
||||
const (
|
||||
// AnnotationApplicationSetRefresh is an annotation that is added when an ApplicationSet is requested to be refreshed by a webhook. The ApplicationSet controller will remove this annotation at the end of reconciliation.
|
||||
AnnotationApplicationSetRefresh = "cd.hanzo.ai/application-set-refresh"
|
||||
AnnotationApplicationSetRefresh = "apps.hanzo.ai/application-set-refresh"
|
||||
)
|
||||
|
||||
// gRPC settings
|
||||
|
||||
Vendored
+1
-1
@@ -89,7 +89,7 @@ func populateNodeInfo(un *unstructured.Unstructured, res *ResourceInfo, customLa
|
||||
case "Gateway":
|
||||
populateGatewayInfo(un, res)
|
||||
}
|
||||
case "cd.hanzo.ai":
|
||||
case "apps.hanzo.ai":
|
||||
if gvk.Kind == "Application" {
|
||||
populateApplicationInfo(un, res)
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ test:
|
||||
|
||||
# BUILD-ONLY for the hard-fork cutover: no `deploy:` block. The live `hanzo-cd`
|
||||
# namespace reconciles the whole Hanzo fleet (Hanzo CD IS the delivery mechanism
|
||||
# for everything else), so the prod cutover — cd.hanzo.ai CRDs + image swap
|
||||
# + re-homing every live Application onto cd.hanzo.ai — is a
|
||||
# for everything else), so the prod cutover — apps.hanzo.ai CRDs + image swap
|
||||
# + re-homing every live Application onto apps.hanzo.ai — is a
|
||||
# deliberate, separately-greenlit action, never an auto-deploy on merge. See
|
||||
# universe: infra/k8s/hanzo-cd/ for the prepared-but-HELD swap. (Same
|
||||
# controlled build-only-first pattern as hanzoai/cms.)
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -22,7 +22,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -30,7 +30,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -70,7 +70,7 @@ rules:
|
||||
- leases
|
||||
resourceNames:
|
||||
# Defined in `cmd/argocd-applicationset-controller/commands/applicationset_controller.go`
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
|
||||
@@ -15,11 +15,11 @@ data:
|
||||
- /status
|
||||
# Some Application fields are generated and not related to the application updates itself
|
||||
# The Application itself is already watched by the controller lister, but this configuration is applied for apps of apps
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.argoproj.io_Rollout: |
|
||||
jqPathExpressions:
|
||||
|
||||
@@ -8,7 +8,7 @@ metadata:
|
||||
name: hanzocd-notifications-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
|
||||
@@ -21,7 +21,7 @@ rules:
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@ metadata:
|
||||
app.kubernetes.io/component: applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -22,7 +22,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -30,7 +30,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -70,7 +70,7 @@ rules:
|
||||
- leases
|
||||
resourceNames:
|
||||
# Defined in `cmd/argocd-applicationset-controller/commands/applicationset_controller.go`
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
|
||||
@@ -35,7 +35,7 @@ rules:
|
||||
verbs:
|
||||
- get # supports viewing pod logs from UI
|
||||
- apiGroups:
|
||||
- "cd.hanzo.ai"
|
||||
- "apps.hanzo.ai"
|
||||
resources:
|
||||
- "applications"
|
||||
- "applicationsets"
|
||||
|
||||
+17
-17
@@ -3,11 +3,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applications.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applications.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applications.cd.hanzo.ai
|
||||
name: applications.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: Application
|
||||
listKind: ApplicationList
|
||||
@@ -7113,11 +7113,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applicationsets.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applicationsets.cd.hanzo.ai
|
||||
name: applicationsets.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: ApplicationSet
|
||||
listKind: ApplicationSetList
|
||||
@@ -30451,11 +30451,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: appprojects.cd.hanzo.ai
|
||||
app.kubernetes.io/name: appprojects.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: appprojects.cd.hanzo.ai
|
||||
name: appprojects.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: AppProject
|
||||
listKind: AppProjectList
|
||||
@@ -30945,7 +30945,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -30984,7 +30984,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -30998,7 +30998,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -31006,7 +31006,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31041,7 +31041,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31173,11 +31173,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
Generated
+17
-17
@@ -3,11 +3,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applications.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applications.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applications.cd.hanzo.ai
|
||||
name: applications.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: Application
|
||||
listKind: ApplicationList
|
||||
@@ -7113,11 +7113,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applicationsets.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applicationsets.cd.hanzo.ai
|
||||
name: applicationsets.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: ApplicationSet
|
||||
listKind: ApplicationSetList
|
||||
@@ -30451,11 +30451,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: appprojects.cd.hanzo.ai
|
||||
app.kubernetes.io/name: appprojects.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: appprojects.cd.hanzo.ai
|
||||
name: appprojects.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: AppProject
|
||||
listKind: AppProjectList
|
||||
@@ -30936,7 +30936,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -30975,7 +30975,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -30989,7 +30989,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -30997,7 +30997,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31032,7 +31032,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31164,11 +31164,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
Generated
+3
-3
@@ -2,11 +2,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applications.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applications.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applications.cd.hanzo.ai
|
||||
name: applications.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: Application
|
||||
listKind: ApplicationList
|
||||
|
||||
Generated
+3
-3
@@ -2,11 +2,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applicationsets.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applicationsets.cd.hanzo.ai
|
||||
name: applicationsets.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: ApplicationSet
|
||||
listKind: ApplicationSetList
|
||||
|
||||
Generated
+3
-3
@@ -2,11 +2,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: appprojects.cd.hanzo.ai
|
||||
app.kubernetes.io/name: appprojects.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: appprojects.cd.hanzo.ai
|
||||
name: appprojects.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: AppProject
|
||||
listKind: AppProjectList
|
||||
|
||||
Generated
+24
-24
@@ -3,11 +3,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applications.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applications.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applications.cd.hanzo.ai
|
||||
name: applications.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: Application
|
||||
listKind: ApplicationList
|
||||
@@ -7113,11 +7113,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applicationsets.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applicationsets.cd.hanzo.ai
|
||||
name: applicationsets.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: ApplicationSet
|
||||
listKind: ApplicationSetList
|
||||
@@ -30451,11 +30451,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: appprojects.cd.hanzo.ai
|
||||
app.kubernetes.io/name: appprojects.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: appprojects.cd.hanzo.ai
|
||||
name: appprojects.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: AppProject
|
||||
listKind: AppProjectList
|
||||
@@ -30972,7 +30972,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31011,7 +31011,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31025,7 +31025,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -31033,7 +31033,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31068,7 +31068,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31105,7 +31105,7 @@ metadata:
|
||||
name: hanzocd-notifications-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -31187,7 +31187,7 @@ rules:
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -31238,7 +31238,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31252,7 +31252,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -31260,7 +31260,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31295,7 +31295,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31340,7 +31340,7 @@ rules:
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31517,11 +31517,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
Generated
+24
-24
@@ -3,11 +3,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applications.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applications.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applications.cd.hanzo.ai
|
||||
name: applications.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: Application
|
||||
listKind: ApplicationList
|
||||
@@ -7113,11 +7113,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.cd.hanzo.ai
|
||||
app.kubernetes.io/name: applicationsets.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: applicationsets.cd.hanzo.ai
|
||||
name: applicationsets.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: ApplicationSet
|
||||
listKind: ApplicationSetList
|
||||
@@ -30451,11 +30451,11 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: appprojects.cd.hanzo.ai
|
||||
app.kubernetes.io/name: appprojects.apps.hanzo.ai
|
||||
app.kubernetes.io/part-of: hanzocd
|
||||
name: appprojects.cd.hanzo.ai
|
||||
name: appprojects.apps.hanzo.ai
|
||||
spec:
|
||||
group: cd.hanzo.ai
|
||||
group: apps.hanzo.ai
|
||||
names:
|
||||
kind: AppProject
|
||||
listKind: AppProjectList
|
||||
@@ -30963,7 +30963,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31002,7 +31002,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31016,7 +31016,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -31024,7 +31024,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31059,7 +31059,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31096,7 +31096,7 @@ metadata:
|
||||
name: hanzocd-notifications-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -31178,7 +31178,7 @@ rules:
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -31229,7 +31229,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31243,7 +31243,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -31251,7 +31251,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -31286,7 +31286,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -31331,7 +31331,7 @@ rules:
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -31508,11 +31508,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
+10
-10
@@ -90,7 +90,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -129,7 +129,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -143,7 +143,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -151,7 +151,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -186,7 +186,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -223,7 +223,7 @@ metadata:
|
||||
name: hanzocd-notifications-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -305,7 +305,7 @@ rules:
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -437,11 +437,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
Generated
+10
-10
@@ -81,7 +81,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -120,7 +120,7 @@ metadata:
|
||||
name: hanzocd-applicationset-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- applicationsets
|
||||
@@ -134,7 +134,7 @@ rules:
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- appprojects
|
||||
verbs:
|
||||
@@ -142,7 +142,7 @@ rules:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applicationsets/status
|
||||
verbs:
|
||||
@@ -177,7 +177,7 @@ rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- 58ac56fa.applicationsets.cd.hanzo.ai
|
||||
- 58ac56fa.applicationsets.apps.hanzo.ai
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
@@ -214,7 +214,7 @@ metadata:
|
||||
name: hanzocd-notifications-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -296,7 +296,7 @@ rules:
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- cd.hanzo.ai
|
||||
- apps.hanzo.ai
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
@@ -428,11 +428,11 @@ data:
|
||||
resource.customizations.ignoreResourceUpdates.all: |
|
||||
jsonPointers:
|
||||
- /status
|
||||
resource.customizations.ignoreResourceUpdates.cd.hanzo.ai_Application: |
|
||||
resource.customizations.ignoreResourceUpdates.apps.hanzo.ai_Application: |
|
||||
jqPathExpressions:
|
||||
- '.metadata.annotations."notified.notifications.argoproj.io"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."cd.hanzo.ai/hydrate"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/refresh"'
|
||||
- '.metadata.annotations."apps.hanzo.ai/hydrate"'
|
||||
- '.operation'
|
||||
resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
|
||||
jqPathExpressions:
|
||||
|
||||
@@ -2,7 +2,7 @@ package application
|
||||
|
||||
const (
|
||||
// API Group
|
||||
Group string = "cd.hanzo.ai"
|
||||
Group string = "apps.hanzo.ai"
|
||||
|
||||
// Application constants
|
||||
ApplicationKind string = "Application"
|
||||
|
||||
@@ -3,14 +3,14 @@ package v1alpha1
|
||||
const (
|
||||
// AnnotationKeyRefresh is the annotation key which indicates that app needs to be refreshed. Removed by application controller after app is refreshed.
|
||||
// Might take values 'normal'/'hard'. Value 'hard' means manifest cache and target cluster state cache should be invalidated before refresh.
|
||||
AnnotationKeyRefresh string = "cd.hanzo.ai/refresh"
|
||||
AnnotationKeyRefresh string = "apps.hanzo.ai/refresh"
|
||||
// AnnotationKeyHydrate is the annotation key which indicates that app needs to be hydrated. Removed by application controller after app is hydrated.
|
||||
AnnotationKeyHydrate string = "cd.hanzo.ai/hydrate"
|
||||
AnnotationKeyHydrate string = "apps.hanzo.ai/hydrate"
|
||||
// AnnotationKeyManifestGeneratePaths is an annotation that contains a list of semicolon-separated paths in the
|
||||
// manifests repository that affects the manifest generation. Paths might be either relative or absolute. The
|
||||
// absolute path means an absolute path within the repository and the relative path is relative to the application
|
||||
// source path within the repository.
|
||||
AnnotationKeyManifestGeneratePaths = "cd.hanzo.ai/manifest-generate-paths"
|
||||
AnnotationKeyManifestGeneratePaths = "apps.hanzo.ai/manifest-generate-paths"
|
||||
// AnnotationKeyManagedByURL contains the URL of the Hanzo CD instance managing the application
|
||||
AnnotationKeyManagedByURL = "cd.hanzo.ai/managed-by-url"
|
||||
AnnotationKeyManagedByURL = "apps.hanzo.ai/managed-by-url"
|
||||
)
|
||||
|
||||
@@ -7,19 +7,19 @@ const (
|
||||
DefaultSyncRetryDuration time.Duration = 5000000000 // 5s
|
||||
DefaultSyncRetryFactor = int64(2)
|
||||
// ResourcesFinalizerName is the finalizer value which we inject to finalize deletion of an application
|
||||
ResourcesFinalizerName string = "resources-finalizer.cd.hanzo.ai"
|
||||
ResourcesFinalizerName string = "resources-finalizer.apps.hanzo.ai"
|
||||
|
||||
// PreDeleteFinalizerName is the finalizer that controls pre-delete hooks execution
|
||||
PreDeleteFinalizerName string = "pre-delete-finalizer.cd.hanzo.ai"
|
||||
PreDeleteFinalizerName string = "pre-delete-finalizer.apps.hanzo.ai"
|
||||
|
||||
// PostDeleteFinalizerName is the finalizer that controls post-delete hooks execution
|
||||
PostDeleteFinalizerName string = "post-delete-finalizer.cd.hanzo.ai"
|
||||
PostDeleteFinalizerName string = "post-delete-finalizer.apps.hanzo.ai"
|
||||
|
||||
// ForegroundPropagationPolicyFinalizer is the finalizer we inject to delete application with foreground propagation policy
|
||||
ForegroundPropagationPolicyFinalizer string = "resources-finalizer.cd.hanzo.ai/foreground"
|
||||
ForegroundPropagationPolicyFinalizer string = "resources-finalizer.apps.hanzo.ai/foreground"
|
||||
|
||||
// BackgroundPropagationPolicyFinalizer is the finalizer we inject to delete application with background propagation policy
|
||||
BackgroundPropagationPolicyFinalizer = "resources-finalizer.cd.hanzo.ai/background"
|
||||
BackgroundPropagationPolicyFinalizer = "resources-finalizer.apps.hanzo.ai/background"
|
||||
|
||||
// DefaultAppProjectName contains name of 'default' app project, which is available in every Hanzo CD installation
|
||||
DefaultAppProjectName = "default"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Package v1alpha1 is the v1alpha1 version of the API.
|
||||
// +groupName=cd.hanzo.ai
|
||||
// +groupName=apps.hanzo.ai
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
package v1alpha1
|
||||
|
||||
@@ -2150,7 +2150,7 @@ func (t *ApplicationTree) GetSummary(app *Application) ApplicationSummary {
|
||||
for _, image := range node.Images {
|
||||
imagesSet[image] = true
|
||||
}
|
||||
if node.Group == "cd.hanzo.ai" && node.Kind == "Application" {
|
||||
if node.Group == "apps.hanzo.ai" && node.Kind == "Application" {
|
||||
appOfApps = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func NewFilteredApplicationInformer(client versioned.Interface, namespace string
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewApplicationInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer {
|
||||
gvr := schema.GroupVersionResource{Group: "cd.hanzo.ai", Version: "v1alpha1", Resource: "applications"}
|
||||
gvr := schema.GroupVersionResource{Group: "apps.hanzo.ai", Version: "v1alpha1", Resource: "applications"}
|
||||
identifier := options.InformerName.WithResource(gvr)
|
||||
tweakListOptions := options.TweakListOptions
|
||||
return cache.NewSharedIndexInformerWithOptions(
|
||||
|
||||
@@ -48,7 +48,7 @@ func NewFilteredApplicationSetInformer(client versioned.Interface, namespace str
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewApplicationSetInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer {
|
||||
gvr := schema.GroupVersionResource{Group: "cd.hanzo.ai", Version: "v1alpha1", Resource: "applicationsets"}
|
||||
gvr := schema.GroupVersionResource{Group: "apps.hanzo.ai", Version: "v1alpha1", Resource: "applicationsets"}
|
||||
identifier := options.InformerName.WithResource(gvr)
|
||||
tweakListOptions := options.TweakListOptions
|
||||
return cache.NewSharedIndexInformerWithOptions(
|
||||
|
||||
@@ -48,7 +48,7 @@ func NewFilteredAppProjectInformer(client versioned.Interface, namespace string,
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewAppProjectInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer {
|
||||
gvr := schema.GroupVersionResource{Group: "cd.hanzo.ai", Version: "v1alpha1", Resource: "appprojects"}
|
||||
gvr := schema.GroupVersionResource{Group: "apps.hanzo.ai", Version: "v1alpha1", Resource: "appprojects"}
|
||||
identifier := options.InformerName.WithResource(gvr)
|
||||
tweakListOptions := options.TweakListOptions
|
||||
return cache.NewSharedIndexInformerWithOptions(
|
||||
|
||||
@@ -204,7 +204,7 @@ func (s *Server) getAppEnforceRBAC(ctx context.Context, action, project, namespa
|
||||
if apierrors.IsNotFound(err) {
|
||||
if project != "" {
|
||||
// We know that the user was allowed to get the Application, but the Application does not exist. Return 404.
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "cd.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "apps.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
}
|
||||
// We don't know if the user was allowed to get the Application, and we don't want to leak information about
|
||||
// the Application's existence. Return 403.
|
||||
@@ -226,7 +226,7 @@ func (s *Server) getAppEnforceRBAC(ctx context.Context, action, project, namespa
|
||||
// The user specified a project. We would have returned a 404 if the user had access to the app, but the app
|
||||
// did not exist. So we have to return a 404 when the app does exist, but the user does not have access.
|
||||
// Otherwise, they could infer that the app exists based on the error code.
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "cd.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "apps.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
}
|
||||
// The user didn't specify a project. We always return permission denied for both lack of access and lack of
|
||||
// existence.
|
||||
@@ -243,7 +243,7 @@ func (s *Server) getAppEnforceRBAC(ctx context.Context, action, project, namespa
|
||||
}).Warnf("user tried to %s application in project %s, but the application is in project %s", action, project, effectiveProject)
|
||||
// The user has access to the app, but the app is in a different project. Return 404, meaning "app doesn't
|
||||
// exist in that project".
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "cd.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
return nil, nil, status.Error(codes.NotFound, apierrors.NewNotFound(schema.GroupResource{Group: "apps.hanzo.ai", Resource: "applications"}, name).Error())
|
||||
}
|
||||
// Get the app's associated project, and make sure all project restrictions are enforced.
|
||||
proj, err := s.getAppProject(ctx, a, logCtx)
|
||||
|
||||
Reference in New Issue
Block a user