Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
4333
views
HELM(error) data: Too long: must have at most 1048576 bytes
ok I have a huge applications with multiple components, each have plentyful config files directory tree looks like this # ls -1 . Chart.yaml configs templates values.yaml # ls -1 configs component1-config component2-config component3-config component4-config # ls -1 templates component1.yaml compone...
ok I have a huge applications with multiple components, each have plentyful config files
directory tree looks like this
# ls -1 .
Chart.yaml
configs
templates
values.yaml
# ls -1 configs
component1-config
component2-config
component3-config
component4-config
# ls -1 templates
component1.yaml
component2.yaml
component3.yaml
component4.yaml
_helpers.tpl
secrets.yaml
I am creating configmaps for multiple folders of each component like this
---
apiVersion: v1
kind: ConfigMap
metadata:
name: config-component1-folder1
namespace: {{ .Values.nSpace }}
data:
{{ $currentScope := . }}
{{ range $path, $_ := .Files.Glob "configs/component1/folder1/**" }}
{{- with $currentScope}}
{{ (base $path) }}: |-
{{ .Files.Get $path | indent 6 }}
{{ end }}
{{ end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: config-component1-folder2
namespace: {{ .Values.nSpace }}
data:
{{ $currentScope := . }}
{{ range $path, $_ := .Files.Glob "configs/component1/folder2/**" }}
{{- with $currentScope}}
{{ (base $path) }}: |-
{{ .Files.Get $path | indent 6 }}
{{ end }}
{{ end }}
and some standard deployment & services also included
problem is when I run
helm install myapp .
it throws this data too long error
which I want to avoid, as my application may grow.
Error: INSTALLATION FAILED: create: failed to create: Secret "sh.helm.release.v1.myapp.v1" is invalid: data: Too long: must have at most 1048576 bytes
Sollosa
(1993 rep)
Mar 3, 2023, 02:39 PM
• Last activity: Jun 26, 2025, 06:01 PM
0
votes
1
answers
833
views
.Files.Glob pattern for a helm configmap
I have directory structure like this $ tree . . ├── Chart.yaml ├── datafiles │   ├── index.html │   ├── style.css │   ├── exclude.txt │   └── text │   ├── file1.txt │   ├── file2.txt I want to create configmaps with these conditions 1. Incl...
I have directory structure like this
$ tree .
.
├── Chart.yaml
├── datafiles
│ ├── index.html
│ ├── style.css
│ ├── exclude.txt
│ └── text
│ ├── file1.txt
│ ├── file2.txt
I want to create configmaps with these conditions
1. Include files from datafiles directory only, and exclude any child directory like text
2. ability to exclude selective file(s) from parent dir like exclude.txt
3. able to templatize values from values file, say some values in index.html will be coming from values.yaml file, so use of tpl function is expected.
I am able to create configmaps by using below pattern, but it tends to include all files in child directories too, also unable to include tpl function for files like index.html
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tpl-index
data:
{{ $currentScope := . }}
{{- range $path, $_ := .Files.Glob "datafiles/**" }}
{{- if not .Files.IsDir $path }}
{{ (base $path) }}: |-
{{ tpl .Files.Get $path | indent 4 }}
{{- end }}
{{- end }}
Sollosa
(1993 rep)
Feb 14, 2024, 07:28 PM
• Last activity: Jun 7, 2024, 11:23 AM
0
votes
1
answers
1341
views
HELM get first element from a helpers template
I have some template inside _helpers.tpl file like this {{- define "clusterNodes" }} - ip: "192.168.7.10" hostnames: - "m1" - ip: "192.168.7.20" hostnames: - "w1" - ip: "192.168.7.30" hostnames: - "w2" {{- end }} and I want to fetch hostnames of first element in above for following yaml apiVersion:...
I have some template inside _helpers.tpl file like this
{{- define "clusterNodes" }}
- ip: "192.168.7.10"
hostnames:
- "m1"
- ip: "192.168.7.20"
hostnames:
- "w1"
- ip: "192.168.7.30"
hostnames:
- "w2"
{{- end }}
and I want to fetch hostnames of first element in above for following yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx2
spec:
replicas: 1
selector:
matchLabels:
app: nginx2
template:
metadata:
labels:
app: nginx2
spec:
nodeName: "{{ (index (index $clusterNodes "clusterNodes") 0).hostnames.0 }}"
containers:
- name: nginx2
image: nginx:alpine
imagePullPolicy: IfNotPresent
so that this entry look like below
nodeName: m1
Sollosa
(1993 rep)
Jul 6, 2023, 06:47 PM
• Last activity: Sep 20, 2023, 07:58 AM
1
votes
0
answers
85
views
Helm upgrade stuck until deleting the data-migration pod
Can anyone please guide me to run the commands in parallel to automate. Suppose for example: I wrote a script to upgrade the helm charts and as soon as the `upgrade` command runs, it gets stuck due to data-migration pod, so we need to delete the data-migration job manually to unblock the `upgrade` c...
Can anyone please guide me to run the commands in parallel to automate.
Suppose for example:
I wrote a script to upgrade the helm charts and as soon as the
upgrade
command runs, it gets stuck due to data-migration pod, so we need to delete the data-migration job manually to unblock the upgrade
command. As soon as I delete the data-migration job manually, the upgrade
command runs.
In the script I am not able to run the delete
command because the upgrade
command must complete before I can run anything else.
Any suggestion would be appreciated.
Dinesh Kumar
(11 rep)
Feb 25, 2021, 07:05 AM
• Last activity: Feb 25, 2021, 11:10 AM
1
votes
0
answers
118
views
helm image pull issue
i have a private registry for images, which works,,,, now i want to use that,, my deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: name: {{ template "mychart.fullname" . }} spec: replicas: {{ .Values.replicaCount }} template: metadata: labels: app: {{ template "mychart.name"...
i have a private registry for images, which works,,,, now i want to use that,,
my deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "mychart.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: {{ template "mychart.name" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}/ssh"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
imagePullSecrets:
- name: "{{ .Values.imageCredentials }}"
and my values.yaml
replicaCount: 1
image:
repository: registry.yoy.online
pullPolicy: IfNotPresent
service:
name: ssh
type: NodePort
externalPort: 31000
internalPort: 2222
imageCredentials:
registry: registry.yoy.online
username: tesing
password: tesing
but it fails,, im sure there is some mistake,
Mohammed Ali
(691 rep)
Jan 21, 2018, 12:44 PM
3
votes
2
answers
560
views
"awk" a value from irregular output by column name
I'm writing a bash script that uses `helm history` (Kubernetes tool) command to get the last revision number of my release. The output for the command is like this: helm history release REVISION UPDATED STATUS CHART DESCRIPTION 1 Mon Feb 27 12:46:10 2017 SUPERSEDED chart-solution-0.1.0-beta1 Install...
I'm writing a bash script that uses
helm history
(Kubernetes tool) command to get the last revision number of my release. The output for the command is like this:
helm history release
REVISION UPDATED STATUS CHART DESCRIPTION
1 Mon Feb 27 12:46:10 2017 SUPERSEDED chart-solution-0.1.0-beta1 Install complete
2 Fri Mar 3 11:40:55 2017 SUPERSEDED chart-solution-0.1.0-beta1 Upgrade complete
3 Fri Mar 3 11:41:02 2017 DEPLOYED chart-solution-0.1.0-beta1 Upgrade complete
The expected result is to return only the number 3
(last value) from the REVISION
column. I can do that for now using:
helm history release | awk -v col=REVISION 'NR==1{for(i=1;i1{print $c}' | tail -n 1
3
However, the "column" UPDATED
is irregular (space separated items), and the above command only works because the REVISION
column comes before UPDATED
.
If in future versions the helm history
command change the order of columns, things can get messed.
A simple example is if I a try to get the last value using the column STATUS
, which comes after UPDATED
:
helm history release | awk -v col=STATUS 'NR==1{for(i=1;i1{print $c}' | tail -n 1
Mar
There is a way to get the correct last REVISION
value even if the column order changes?
Eduardo Baitello
(656 rep)
Mar 3, 2017, 12:25 PM
• Last activity: Mar 4, 2017, 10:53 PM
1
votes
1
answers
125
views
How to know function name inside helm
I just installed `helm` in Emacs. It works fine, but I want to change some key bindings. For example, `Go to precedent level` inside `find-file` is binding with `C-l`. I want to rebind it with `C-w`. I can't call `describe-key` because it is inside mini buffer. How do I know which function is called...
I just installed
helm
in Emacs.
It works fine, but I want to change some key bindings.
For example, Go to precedent level
inside find-file
is binding with C-l
.
I want to rebind it with C-w
.
I can't call describe-key
because it is inside mini buffer.
How do I know which function is called when a specified key is hit with helm-mode
?
ironsand
(5425 rep)
Mar 31, 2014, 09:13 AM
• Last activity: Sep 29, 2014, 07:32 PM
1
votes
0
answers
706
views
How to make `helm-execute-persistent-action` not to follow symlink original path
I want to complete by `Tab` when using `find-file`, so I bind a function `helm-execute-persistent-action` to `Tab` like this. ;; For find-file etc. (define-key helm-read-file-map (kbd "TAB") 'helm-execute-persistent-action) ;; For helm-find-files etc. (define-key helm-find-files-map (kbd "TAB") 'hel...
I want to complete by
Tab
when using find-file
, so I bind a function helm-execute-persistent-action
to Tab
like this.
;; For find-file etc.
(define-key helm-read-file-map (kbd "TAB") 'helm-execute-persistent-action)
;; For helm-find-files etc.
(define-key helm-find-files-map (kbd "TAB") 'helm-execute-persistent-action)
This is much better for me. But there is small problem still, the function expand symlink to original path.
Is there option to disable expanding symbolic link?
ironsand
(5425 rep)
Mar 31, 2014, 09:53 AM
Showing page 1 of 8 total questions