Skip to content

Commit bee922c

Browse files
authored
feat(helm): Update Helm and base Docker image (#55)
* feature: Update Helm to 3.6.1, update API to support --pass-credentials flag and update base Docker image * Helm 3.6.2 * set --pass-credentials default to false * bump versions again
1 parent df45c98 commit bee922c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
FROM azul/zulu-openjdk-alpine:11.0.10-11.45.27 as builder
1+
FROM azul/zulu-openjdk-alpine:11.0.11-11.48.21-jre as builder
22

33
WORKDIR /app
44
ARG JAR_FILE
55
ADD ${JAR_FILE} app.jar
66
RUN java -Djarmode=layertools -jar app.jar extract
77

8-
FROM azul/zulu-openjdk-alpine:11.0.10-11.45.27
8+
FROM azul/zulu-openjdk-alpine:11.0.11-11.48.21-jre
99
LABEL maintainer="team-weasel@subshell.com"
1010

11+
ARG HELM_VERSION="v3.6.3"
12+
ARG HELM_GCS_VERSION="0.3.13"
13+
1114
RUN java -Xshare:dump
1215

1316
# Install Helm + Helm GCS
1417
RUN apk add --update --no-cache curl ca-certificates git && \
15-
curl -L https://get.helm.sh/helm-v3.5.0-linux-amd64.tar.gz |tar xvz && \
18+
curl -L "https://get.helm.sh/helm-$HELM_VERSION-linux-amd64.tar.gz" | tar xvz && \
1619
mv linux-amd64/helm /usr/bin/helm && \
1720
chmod +x /usr/bin/helm && \
18-
helm plugin install https://github.com/hayorov/helm-gcs --version 0.3.9 && \
21+
helm plugin install https://github.com/hayorov/helm-gcs --version $HELM_GCS_VERSION && \
1922
rm -rf linux-amd64 && \
2023
apk del curl git && \
2124
rm -f /var/cache/apk/*
@@ -29,5 +32,5 @@ COPY --from=builder /app/snapshot-dependencies/ ./
2932
COPY --from=builder /app/application/ ./
3033

3134
ENV JDK_JAVA_OPTIONS ""
32-
WORKDIR /app
35+
3336
ENTRYPOINT ["java", "-noverify", "-Xshare:on", "-XX:TieredStopAtLevel=1", "-Djava.security.egd=file:/dev/./urandom", "org.springframework.boot.loader.JarLauncher"]

src/main/java/io/oneko/helmapi/api/Helm.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,14 @@ public List<Release> listInAllNamespaces(String filter) {
100100
}
101101

102102
@Override
103-
public void addRepo(String name, String url, String username, String password, boolean forceUpdate) {
103+
public void addRepo(String name, String url, String username, String password, boolean forceUpdate, boolean passCredentials) {
104104
final String[] command = initCommand("helm", "repo", "add")
105105
.withArgument(name)
106106
.withArgument(url)
107107
.withFlag("--username", username)
108108
.withFlag("--password", password)
109109
.withFlag("--force-update", forceUpdate)
110+
.withFlag("--pass-credentials", passCredentials)
110111
.build();
111112
var out = executor.execute(command);
112113
log.info(out);

src/main/java/io/oneko/helmapi/api/Helm3API.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ default List<Release> listInAllNamespaces() {
4242

4343
// repo
4444
default void addRepo(String name, String url, String username, String password) {
45-
addRepo(name, url, username, password, false);
45+
addRepo(name, url, username, password, false, false);
4646
}
4747

48-
void addRepo(String name, String url, String username, String password, boolean forceUpdate);
48+
void addRepo(String name, String url, String username, String password, boolean forceUpdate, boolean passCredentials);
4949

5050
List<Repository> listRepos();
5151

0 commit comments

Comments
 (0)