Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion images/cdi-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{{- $gitRepoName := "3p-containerized-data-importer" }}
{{- $gitRepoUrl := (printf "%s/%s" "deckhouse" $gitRepoName) }}
{{- $version := get $.Core $gitRepoName }}
{{- $version := "feat/core/exclude-pods-from-quotes" }}

{{- $name := print $.ImageName "-dependencies" -}}
{{- define "$name" -}}
Expand Down Expand Up @@ -37,8 +37,10 @@ secrets:
- id: SOURCE_REPO
value: {{ $.SOURCE_REPO }}
shell:
installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}"
install:
- |
echo "$date"
echo "Git clone {{ $gitRepoName }} repository..."
git clone --depth=1 --branch {{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /src/containerized-data-importer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ const (
// DVCRLabelValue provides a constant for DVCR Pod label values.
DVCRLabelValue = "dvcr-data-importer"

// QuotaExcludeValue provides a constant for exclude quota value.
QuotaExcludeValue = "true"
// QuotaExcludeLabel provides a constant for exclude quota label.
QuotaExcludeLabel = "resource-quota-overrides.deckhouse.io/ignore"

// InhibitNodeShutdownLabel is a label to prevent node shutdown is Pod with label is present.
InhibitNodeShutdownLabel = "pod.deckhouse.io/inhibit-node-shutdown"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ func (imp *Importer) makeImporterPodSpec() (*corev1.Pod, error) {
Name: imp.PodSettings.Name,
Namespace: imp.PodSettings.Namespace,
Labels: map[string]string{
annotations.AppLabel: annotations.DVCRLabelValue,
annotations.AppLabel: annotations.DVCRLabelValue,
annotations.QuotaExcludeLabel: annotations.QuotaExcludeValue,
},
Annotations: map[string]string{
annotations.AnnCreatedBy: "yes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (p *Pod) makeSpec() (*corev1.Pod, error) {
Labels: map[string]string{
annotations.AppLabel: annotations.DVCRLabelValue,
annotations.UploaderServiceLabel: p.PodSettings.ServiceName,
annotations.QuotaExcludeLabel: annotations.QuotaExcludeValue,
},
OwnerReferences: []metav1.OwnerReference{
p.PodSettings.OwnerReference,
Expand Down
2 changes: 1 addition & 1 deletion templates/admission-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
"system:serviceaccount:d8-virtualization:cdi-apiserver",
"system:serviceaccount:d8-virtualization:cdi-cronjob",
"system:serviceaccount:d8-virtualization:cdi-operator",
"system:serviceaccount:d8-virtualization:cdi-sa",
"system:serviceaccount:d8-virtualization:d8-cdi-sa",
"system:serviceaccount:d8-virtualization:cdi-uploadproxy",
"system:serviceaccount:d8-virtualization:kubevirt-internal-virtualization-apiserver",
"system:serviceaccount:d8-virtualization:kubevirt-internal-virtualization-controller",
Expand Down
4 changes: 2 additions & 2 deletions templates/cdi/cdi-deployment/rbac-for-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
{{- include "helm_lib_module_labels" (list . (dict "app" "cdi-deployment")) | nindent 2 }}
subjects:
- kind: ServiceAccount
name: cdi-sa
name: d8-cdi-sa
namespace: d8-{{ .Chart.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: d8:rbac-proxy
name: d8:rbac-proxy
Loading