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

feature flag cloudflare ca issuer key field #415

Merged
merged 1 commit into from
Dec 13, 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
24 changes: 14 additions & 10 deletions containers/clusterForms/shared/setupForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ const SetupForm: FunctionComponent = () => {
installType,
values,
clusterMap,
} = useAppSelector(({ api, installation }) => ({
showCloudflareCaIssuerField,
} = useAppSelector(({ api, installation, featureFlags }) => ({
...api,
...installation,
showCloudflareCaIssuerField: featureFlags.flags.showCloudflareCaIssuerField,
}));

const {
Expand Down Expand Up @@ -274,15 +276,17 @@ const SetupForm: FunctionComponent = () => {
onErrorText="Invalid token."
onChange={handleCloudfareToken}
/>
<ControlledPassword
control={control}
name="cloudflareOriginCaIssuerKey"
label="Cloudflare origin ca issuer key"
rules={{
required: false,
}}
onErrorText="Invalid issuer key"
/>
{showCloudflareCaIssuerField && (
<ControlledPassword
control={control}
name="cloudflareOriginCaIssuerKey"
label="Cloudflare origin ca issuer key"
rules={{
required: false,
}}
onErrorText="Invalid issuer key"
/>
)}
</>
)}
<ControlledAutocomplete
Expand Down
1 change: 1 addition & 0 deletions redux/slices/featureFlags.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const initialState: FeatureFlagsState = {
[FeatureFlag.PROVISION_DO_PYHS_CLUSTERS]: false,
[FeatureFlag.PROVISION_GCP_PYHS_CLUSTERS]: false,
[FeatureFlag.PROVISION_VULTR_PYHS_CLUSTERS]: false,
[FeatureFlag.SHOW_CLOUDFLARE_CA_ISSUER]: false,
},
isLoading: false,
};
Expand Down
1 change: 1 addition & 0 deletions types/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum FeatureFlag {
CLUSTER_PROVISIONING = 'cluster-provisioning',
CLUSTER_MANAGEMENT = 'cluster-managament',
MARKETPLACE = 'marketplace',
SHOW_CLOUDFLARE_CA_ISSUER = 'showCloudflareCaIssuerField',
}

export interface EnvironmentVariables {
Expand Down