Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/cmd/apply-teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const d = terminal(`cmd:${cmdName}:apply-teams`)

export const applyTeams = async (): Promise<boolean> => {
d.info('Deploying team namespaces')
const result = await deployEssential(['team=true'])
const result = await deployEssential(['team=true'], true)

if (result) {
d.info('Teams applied')
Expand Down
5 changes: 3 additions & 2 deletions src/common/hf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getParsedArgs, HelmArguments } from './yargs'
import { ProcessOutputTrimmed, Streams } from './zx-enhance'
import { resolve } from 'path'
import { existsSync, mkdirSync, writeFileSync } from 'fs'
import { applyServerSide } from './k8s'

const replaceHFPaths = (output: string, envDir = env.ENV_DIR): string => output.replaceAll('../env', envDir)
export const HF_DEFAULT_SYNC_ARGS = ['sync', '--concurrency=1', '--sync-args', '--disable-openapi-validation --qps=20']
Expand Down Expand Up @@ -191,7 +192,7 @@ export const hfTemplate = async (
return template
}

export const deployEssential = async (labelOpts: string[] | null = null) => {
export const deployEssential = async (labelOpts: string[] | null = null, force: boolean = false) => {
const d = terminal('common:hf:applyEssential')
const dir = '/tmp/otomi/'

Expand All @@ -215,7 +216,7 @@ export const deployEssential = async (labelOpts: string[] | null = null) => {
}
writeFileSync(templateFile, templateOutput)

await $`kubectl apply --server-side=true -f ${templateFile}`
await applyServerSide(templateFile, force)
}

return true
Expand Down
2 changes: 1 addition & 1 deletion src/common/runtime-upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function runtimeUpgrade({ when }: RuntimeUpgradeArgs): Promise<void
}

d.info('Deploying essential manifests')
const essentialDeployResult = await deployEssential(['upgrade=true'])
const essentialDeployResult = await deployEssential(['upgrade=true'], true)
if (!essentialDeployResult) {
throw new Error('Failed to update namespaces')
}
Expand Down
Loading