Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm/bake): Add additional input fields where we can fill in details of the APIs versions (backport #10036) #10045

Merged
merged 1 commit into from
Oct 18, 2023
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
3 changes: 3 additions & 0 deletions packages/app/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const reduxLoggerEnabled = import.meta.env.VITE_REDUX_LOGGER === 'true' || proce
const templatesEnabled = import.meta.env.VITE_TEMPLATES_ENABLED === 'true' || process.env.TEMPLATES_ENABLED === 'true';
const useClassicFirewallLabels =
import.meta.env.VITE_USE_CLASSIC_FIREWALL_LABELS === 'true' || process.env.USE_CLASSIC_FIREWALL_LABELS === 'true';
const helmApiVersionsEnabled =
import.meta.env.VITE_API_VERSIONS_ENABLED === 'true' || process.env.API_VERSIONS_ENABLED === 'true' || false;
const functionsEnabled =
import.meta.env.VITE_FUNCTIONS_ENABLED === 'true' || process.env.FUNCTIONS_ENABLED === 'true' || false;
const k8sRawResourcesEnabled =
Expand Down Expand Up @@ -130,6 +132,7 @@ window.spinnakerSettings = {
slack: false,
snapshots: false,
functions: functionsEnabled,
helmApiVersions: helmApiVersionsEnabled,
kubernetesRawResources: k8sRawResourcesEnabled,
},
gateUrl: apiHost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
StageArtifactSelectorDelegate,
} from '../../../../../artifact';
import { StageConfigField } from '../../common/stageConfigField/StageConfigField';
import { SETTINGS } from '../../../../../config';
import type { IArtifact, IExpectedArtifact } from '../../../../../domain';
import { MapEditor } from '../../../../../forms';
import { CheckboxInput, TextInput } from '../../../../../presentation';
Expand Down Expand Up @@ -150,9 +151,30 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject

public render() {
const stage = this.props.formik.values;
const enableApiVersions = SETTINGS.feature.helmApiVersions;
return (
<>
<h4>Helm Options</h4>
{enableApiVersions && ( // Only render if enableApiVersions is true
<>
<StageConfigField fieldColumns={3} label={'ApiVersions'}>
<TextInput
onChange={(e: React.ChangeEvent<any>) => {
this.props.formik.setFieldValue('apiVersions', e.target.value);
}}
value={stage.apiVersions}
/>
</StageConfigField>
<StageConfigField fieldColumns={3} label={'KubeVersion'}>
<TextInput
onChange={(e: React.ChangeEvent<any>) => {
this.props.formik.setFieldValue('kubeVersion', e.target.value);
}}
value={stage.kubeVersion}
/>
</StageConfigField>
</>
)}
<StageConfigField fieldColumns={3} label={'Name'}>
<TextInput
onChange={(e: React.ChangeEvent<any>) => {
Expand Down
Loading