Skip to content

Commit 48730d9

Browse files
authored
feat: improve robustness of initial install (#1623)
1 parent 7993122 commit 48730d9

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM otomi/tools:v2.0.2 as ci
1+
FROM otomi/tools:v2.2.0 as ci
22

33
ENV APP_HOME=/home/app/stack
44

@@ -27,7 +27,7 @@ FROM ci as clean
2727
RUN npm prune --production
2828

2929
#-----------------------------
30-
FROM otomi/tools:v2.0.2 as prod
30+
FROM otomi/tools:v2.2.0 as prod
3131

3232
ENV APP_HOME=/home/app/stack
3333
ENV ENV_DIR=/home/app/stack/env

src/cmd/apply.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const applyAll = async () => {
3737
const prevState = await getDeploymentState()
3838
const intitalInstall = isEmpty(prevState.version)
3939
const argv: HelmArguments = getParsedArgs()
40+
const hfArgs = intitalInstall
41+
? ['sync', '--concurrency=1', '--sync-args', '--disable-openapi-validation --qps=20']
42+
: ['apply', '--sync-args', '--qps=20']
4043

4144
await upgrade({ when: 'pre' })
4245
d.info('Start apply all')
@@ -73,13 +76,11 @@ const applyAll = async () => {
7376
fileOpts: 'helmfile.d/helmfile-02.init.yaml',
7477
labelOpts: ['stage=prep'],
7578
logLevel: logLevelString(),
76-
args: ['apply'],
79+
args: hfArgs,
7780
},
7881
{ streams: { stdout: d.stream.log, stderr: d.stream.error } },
7982
)
8083
await prepareDomainSuffix()
81-
// const applyLabel: string = process.env.OTOMI_DEV_APPLY_LABEL || 'stage!=prep'
82-
// d.info(`Deploying charts containing label ${applyLabel}`)
8384

8485
let labelOpts = ['']
8586
if (intitalInstall) {
@@ -102,7 +103,7 @@ const applyAll = async () => {
102103
{
103104
labelOpts,
104105
logLevel: logLevelString(),
105-
args: ['apply'],
106+
args: hfArgs,
106107
},
107108
{ streams: { stdout: d.stream.log, stderr: d.stream.error } },
108109
)
@@ -116,7 +117,7 @@ const applyAll = async () => {
116117
// 'fileOpts' limits the hf scope and avoids parse errors (we only have basic values in this statege):
117118
fileOpts: `${rootDir}/helmfile.tpl/helmfile-e2e.yaml`,
118119
logLevel: logLevelString(),
119-
args: ['apply'],
120+
args: hfArgs,
120121
},
121122
{ streams: { stdout: d.stream.log, stderr: d.stream.error } },
122123
)

tools/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ FROM ubuntu:20.04 as builder
44
ARG DEBIAN_FRONTEND=noninteractive
55
ARG TARGETARCH
66
# https://github.com/kubernetes/kubernetes/releases
7-
ARG KUBECTL_VERSION=1.26.9
7+
ARG KUBECTL_VERSION=1.28.10
88
# https://github.com/helm/helm/tags
9-
ARG HELM_VERSION=3.12.3
9+
ARG HELM_VERSION=3.15.1
1010
# https://github.com/databus23/helm-diff/releases
11-
ARG HELM_DIFF_VERSION=3.8.0
11+
ARG HELM_DIFF_VERSION=3.9.7
1212
# https://github.com/jkroepke/helm-secrets/releases
1313
ARG HELM_SECRETS_VERSION=3.15.0
1414
# https://github.com/mozilla/sops/releases
1515
ARG SOPS_VERSION=3.7.3
1616
# https://github.com/noqcks/gucci/releases
1717
ARG GUCCI_VERSION=1.6.6
1818
# https://github.com/helmfile/helmfile/releases
19-
ARG HELMFILE_VERSION=0.156.0
19+
ARG HELMFILE_VERSION=0.165.0
2020
# https://github.com/open-policy-agent/opa/releases
2121
ARG OPA_VERSION=0.50.1
2222
# https://github.com/yannh/kubeconform/releases

0 commit comments

Comments
 (0)