diff --git a/app/edge/components/EdgeScriptForm/EdgePropertiesForm.tsx b/app/edge/components/EdgeScriptForm/EdgePropertiesForm.tsx index 622631ea1..6c82fae0c 100644 --- a/app/edge/components/EdgeScriptForm/EdgePropertiesForm.tsx +++ b/app/edge/components/EdgeScriptForm/EdgePropertiesForm.tsx @@ -55,21 +55,19 @@ export function EdgePropertiesForm({ - {values.platform !== 'k8s' && ( - - setFieldValue(e.target.name, e.target.value)} - /> - - )} + + setFieldValue(e.target.name, e.target.value)} + /> + ); } diff --git a/app/edge/components/EdgeScriptForm/Scripts.tsx b/app/edge/components/EdgeScriptForm/Scripts.tsx index 96fb653e6..ccf7bd561 100644 --- a/app/edge/components/EdgeScriptForm/Scripts.tsx +++ b/app/edge/components/EdgeScriptForm/Scripts.tsx @@ -262,7 +262,7 @@ function buildKubernetesCommand( edgeIdScript: string, edgeKey: string, allowSelfSignedCerts: boolean, - _envVars: string, + envVars: string, edgeId?: string, agentSecret = '' ) { @@ -270,11 +270,13 @@ function buildKubernetesCommand( const idEnvVar = edgeIdScript ? `PORTAINER_EDGE_ID=$(${edgeIdScript}) \n\n` : ''; + const edgeIdVar = !edgeIdScript && edgeId ? edgeId : '$PORTAINER_EDGE_ID'; + const selfSigned = allowSelfSignedCerts ? '1' : '0'; return `${idEnvVar}curl https://downloads.portainer.io/ce${agentShortVersion}/portainer-edge-agent-setup.sh | - bash -s -- "${ - !edgeIdScript && edgeId ? edgeId : '$PORTAINER_EDGE_ID' - }" "${edgeKey}" "${allowSelfSignedCerts ? '1' : '0'}" "${agentSecret}"`; + bash -s -- "${edgeIdVar}" \\ + "${edgeKey}" \\ + "${selfSigned}" "${agentSecret}" "${envVars}"`; } function buildDefaultEnvVars(