Skip to content

Commit

Permalink
Fixes for smooth ArgoCD uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiolor committed Dec 5, 2024
1 parent 983e9a9 commit 2a81120
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions deployments/liqo/templates/pre-delete-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
labels:
{{- include "liqo.labels" $predelete| nindent 4 }}
annotations:
argocd.argoproj.io/hook: PreSync
{{- include "liqo.preDeleteAnnotations" $predelete| nindent 4 }}
spec:
template:
Expand Down
3 changes: 2 additions & 1 deletion deployments/liqo/templates/pre-delete-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ metadata:
labels:
{{- include "liqo.labels" $predelete| nindent 4 }}
annotations:
{{- include "liqo.preDeleteAnnotations" $predelete| nindent 4 }}
argocd.argoproj.io/hook: PreSync
{{- include "liqo.preDeleteAnnotations" $predelete| nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
6 changes: 6 additions & 0 deletions pkg/consts/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ const (
// APIServerProxyAppName label value that denotes the name of the liqo-api-server-proxy deployment.
APIServerProxyAppName = "proxy"

// OffloadingComponentKey is the label assigned to the Liqo components related to offloading.
OffloadingComponentKey = "offloading.liqo.io/component"

// NetworkingComponentKey is the label assigned to the Liqo components related to networking.
NetworkingComponentKey = "networking.liqo.io/component"

// IpamStorageResourceLabelKey is the constant representing
// the key of the label assigned to all IpamStorage resources.
IpamStorageResourceLabelKey = "ipam.liqo.io/ipamstorage"
Expand Down
3 changes: 2 additions & 1 deletion pkg/gateway/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
package gateway

import (
"github.com/liqotech/liqo/pkg/consts"
"github.com/liqotech/liqo/pkg/firewall"
"github.com/liqotech/liqo/pkg/gateway/concurrent"
"github.com/liqotech/liqo/pkg/route"
)

const (
// GatewayComponentKey is the key used to label the gateway pod.
GatewayComponentKey = "networking.liqo.io/component"
GatewayComponentKey = consts.NetworkingComponentKey

// GatewayComponentGateway is the key used to label the gateway pod.
GatewayComponentGateway = "gateway"
Expand Down
6 changes: 1 addition & 5 deletions pkg/vkMachinery/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ const CRBPrefix = "liqo-node-"

// KubeletBaseLabels are the static labels that are set on every VirtualKubelet.
var KubeletBaseLabels = map[string]string{
consts.K8sAppNameKey: "virtual-kubelet",
consts.K8sAppInstanceKey: "virtual-kubelet",
consts.K8sAppManagedByKey: consts.LiqoAppLabelValue,
consts.K8sAppComponentKey: "virtual-kubelet",
consts.K8sAppPartOfKey: "liqo",
consts.OffloadingComponentKey: "virtual-kubelet",
}

// ClusterRoleBindingLabels are the static labels that are set on every ClusterRoleBinding managed by Liqo.
Expand Down

0 comments on commit 2a81120

Please sign in to comment.