Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
923bc854
Commit
923bc854
authored
Nov 22, 2021
by
Brad Davidson
Committed by
Brad Davidson
Jan 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add package version to traefik helm chart
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
(cherry picked from commit a3cab2664e138e293005edbbfc6140e745a2292b)
parent
5ec623d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
traefik.yaml
manifests/traefik.yaml
+2
-2
Chart.yaml
scripts/chart-templates/crd-base/Chart.yaml
+1
-1
download
scripts/download
+15
-6
No files found.
manifests/traefik.yaml
View file @
923bc854
...
@@ -4,7 +4,7 @@ metadata:
...
@@ -4,7 +4,7 @@ metadata:
name
:
traefik-crd
name
:
traefik-crd
namespace
:
kube-system
namespace
:
kube-system
spec
:
spec
:
chart
:
https://%{KUBERNETES_API}%/static/charts/traefik-crd-
9.18.2
.tgz
chart
:
https://%{KUBERNETES_API}%/static/charts/traefik-crd-
10.3.001
.tgz
---
---
apiVersion
:
helm.cattle.io/v1
apiVersion
:
helm.cattle.io/v1
kind
:
HelmChart
kind
:
HelmChart
...
@@ -12,7 +12,7 @@ metadata:
...
@@ -12,7 +12,7 @@ metadata:
name
:
traefik
name
:
traefik
namespace
:
kube-system
namespace
:
kube-system
spec
:
spec
:
chart
:
https://%{KUBERNETES_API}%/static/charts/traefik-
9.18.2
.tgz
chart
:
https://%{KUBERNETES_API}%/static/charts/traefik-
10.3.001
.tgz
set
:
set
:
global.systemDefaultRegistry
:
"
%{SYSTEM_DEFAULT_REGISTRY_RAW}%"
global.systemDefaultRegistry
:
"
%{SYSTEM_DEFAULT_REGISTRY_RAW}%"
valuesContent
:
|-
valuesContent
:
|-
...
...
scripts/chart-templates/crd-base/Chart.yaml
View file @
923bc854
apiVersion
:
${api_version}
apiVersion
:
${api_version}
version
:
${chart_version}
version
:
${chart_version}
${package_version}
description
:
Installs the CRDs for ${name}.
description
:
Installs the CRDs for ${name}.
name
:
${name}-crd
name
:
${name}-crd
type
:
application
type
:
application
...
...
scripts/download
View file @
923bc854
#!/bin/bash
#!/bin/bash
set
-e
cd
$(
dirname
$0
)
/..
cd
$(
dirname
$0
)
/..
.
./scripts/version.sh
.
./scripts/version.sh
TRAEFIK_VERSION
=
$(
yq e
'.spec.chart'
manifests/traefik.yaml |
awk
'match($0, /([0-9.]+[0-9])/, m) { print m[1]; exit; }'
)
TRAEFIK_CHART_VERSION
=
$(
yq e
'.spec.chart'
manifests/traefik.yaml |
awk
'match($0, /([0-9.]+)([0-9]{2})/, m) { print m[1]; exit; }'
)
TRAEFIK_PACKAGE_VERSION
=
$(
yq e
'.spec.chart'
manifests/traefik.yaml |
awk
'match($0, /([0-9.]+)([0-9]{2})/, m) { print m[2]; exit; }'
)
TRAEFIK_FILE
=
traefik-
${
TRAEFIK_CHART_VERSION
}${
TRAEFIK_PACKAGE_VERSION
}
.tgz
TRAEFIK_CRD_FILE
=
traefik-crd-
${
TRAEFIK_CHART_VERSION
}${
TRAEFIK_PACKAGE_VERSION
}
.tgz
TRAEFIK_URL
=
https://helm.traefik.io/traefik/traefik-
${
TRAEFIK_CHART_VERSION
}
.tgz
CHARTS_DIR
=
build/static/charts
CHARTS_DIR
=
build/static/charts
RUNC_DIR
=
build/src/github.com/opencontainers/runc
RUNC_DIR
=
build/src/github.com/opencontainers/runc
DATA_DIR
=
build/data
DATA_DIR
=
build/data
...
@@ -52,7 +58,8 @@ download_and_package_traefik () {
...
@@ -52,7 +58,8 @@ download_and_package_traefik () {
# Collect information on chart
# Collect information on chart
name
=
$(
yq e
'.name'
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
)
name
=
$(
yq e
'.name'
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
)
api_version
=
$(
yq e
'.apiVersion'
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
)
api_version
=
$(
yq e
'.apiVersion'
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
)
chart_version
=
$(
yq e
'.version'
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
)
chart_version
=
${
TRAEFIK_CHART_VERSION
}
package_version
=
${
TRAEFIK_PACKAGE_VERSION
}
# Collect information on CRDs
# Collect information on CRDs
crd_apis
=()
crd_apis
=()
...
@@ -90,6 +97,12 @@ download_and_package_traefik () {
...
@@ -90,6 +97,12 @@ download_and_package_traefik () {
echo
-e
'global:\n systemDefaultRegistry: ""'
>>
${
TRAEFIK_TMP_CHART
}
/values.yaml
echo
-e
'global:\n systemDefaultRegistry: ""'
>>
${
TRAEFIK_TMP_CHART
}
/values.yaml
find
${
TRAEFIK_TMP_CHART
}
-type
f | xargs
sed
-i
's/{{ .Values.image.name }}/{{ template "system_default_registry" .}}&/g'
find
${
TRAEFIK_TMP_CHART
}
-type
f | xargs
sed
-i
's/{{ .Values.image.name }}/{{ template "system_default_registry" .}}&/g'
# Modify chart version to append package version
# If we alter our repackaging of the helm chart without also bumping the version of the
# chart, the package version portion (final two digits) of the version string in the
# traefik HelmChart manifest should be bumped accordingly.
sed
-i
"s/version: .*/&
${
TRAEFIK_PACKAGE_VERSION
}
/"
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
# Add dashboard annotations to main chart
# Add dashboard annotations to main chart
cat
<<
EOF
>>
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
cat
<<
EOF
>>
${
TRAEFIK_TMP_CHART
}
/Chart.yaml
annotations:
annotations:
...
@@ -112,10 +125,6 @@ EOF
...
@@ -112,10 +125,6 @@ EOF
done
done
}
}
TRAEFIK_FILE
=
traefik-
${
TRAEFIK_VERSION
}
.tgz
TRAEFIK_CRD_FILE
=
traefik-crd-
${
TRAEFIK_VERSION
}
.tgz
TRAEFIK_URL
=
https://helm.traefik.io/traefik/
${
TRAEFIK_FILE
}
setup_tmp
setup_tmp
download_and_package_traefik
download_and_package_traefik
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment