Skip to content
Open
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
4 changes: 4 additions & 0 deletions locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"A minimum of 3 nodes are required for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.": "A minimum of 3 nodes are required for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.",
"A mirror peer configuration already exists for one or more of the selected clusters, either from an existing or deleted DR policy. To create a new DR policy with these clusters, delete any existing mirror peer configurations associated with them and try again.": "A mirror peer configuration already exists for one or more of the selected clusters, either from an existing or deleted DR policy. To create a new DR policy with these clusters, delete any existing mirror peer configurations associated with them and try again.",
"A namespace controls access to the OBC and ties the buckets to a specific project.": "A namespace controls access to the OBC and ties the buckets to a specific project.",
"A Namespace with same SELinux/Annotations is automatically created on the destination cluster when the application is enrolled": "A Namespace with same SELinux/Annotations is automatically created on the destination cluster when the application is enrolled",
"A PEM-encoded CA certificate file used to verify the Vault server's SSL certificate.": "A PEM-encoded CA certificate file used to verify the Vault server's SSL certificate.",
"A PEM-encoded client certificate. This certificate is used for TLS communication with the Vault server.": "A PEM-encoded client certificate. This certificate is used for TLS communication with the Vault server.",
"A prefix filters bucket objects by their keys.": "A prefix filters bucket objects by their keys.",
Expand Down Expand Up @@ -2261,6 +2262,7 @@
"The path where kubernetes auth method is enabled in Vault. The default path is kubernetes. If the auth method is enabled in a different path other than kubernetes, this variable needs to be set as \"/v1/auth/<path>/login\".": "The path where kubernetes auth method is enabled in Vault. The default path is kubernetes. If the auth method is enabled in a different path other than kubernetes, this variable needs to be set as \"/v1/auth/<path>/login\".",
"The policy sync interval is only applicable to volumes.": "The policy sync interval is only applicable to volumes.",
"The pool name comprises a prefix followed by the user-provided name.": "The pool name comprises a prefix followed by the user-provided name.",
"The retainNamespaceSCCAcrossPeers flag is disabled in the RamenConfig.": "The retainNamespaceSCCAcrossPeers flag is disabled in the RamenConfig.",
"The Savings metric represents the actual disk capacity saved inclusive of all compression-enabled pools and associated replicas.": "The Savings metric represents the actual disk capacity saved inclusive of all compression-enabled pools and associated replicas.",
"The selected clusters are running different versions of Data Foundation. Peering clusters with different versions can lead to potential issues and is not recommended. Ensure all clusters are upgraded to the same version before proceeding with peering to avoid operational risks.": "The selected clusters are running different versions of Data Foundation. Peering clusters with different versions can lead to potential issues and is not recommended. Ensure all clusters are upgraded to the same version before proceeding with peering to avoid operational risks.",
"The selected clusters cannot be peered due to a mismatch in types. Ensure both clusters are of the same type to continue.": "The selected clusters cannot be peered due to a mismatch in types. Ensure both clusters are of the same type to continue.",
Expand Down Expand Up @@ -2290,6 +2292,7 @@
"This card shows the requested capacity for different Kubernetes resources. The figures shown represent the usable storage, meaning that data replication is not taken into consideration.": "This card shows the requested capacity for different Kubernetes resources. The figures shown represent the usable storage, meaning that data replication is not taken into consideration.",
"This card shows used capacity for different resources. The available capacity is based on cloud services therefore it cannot be shown.": "This card shows used capacity for different resources. The available capacity is based on cloud services therefore it cannot be shown.",
"This field is required": "This field is required",
"This flag must be enabled before it can be used of enrolled applications.": "This flag must be enabled before it can be used of enrolled applications.",
"This is a required field": "This is a required field",
"This is a required field.": "This is a required field.",
"This is a required field. The StorageClass will be used to request storage from the underlying infrastructure to create the backing persistent volumes that will be used to provide the Data Foundation service.": "This is a required field. The StorageClass will be used to request storage from the underlying infrastructure to create the backing persistent volumes that will be used to provide the Data Foundation service.",
Expand Down Expand Up @@ -2435,6 +2438,7 @@
"Use groups of shared LUNs from local cluster nodes to create StorageClasses with Fusion Data Foundation Access for SAN.": "Use groups of shared LUNs from local cluster nodes to create StorageClasses with Fusion Data Foundation Access for SAN.",
"Use public network": "Use public network",
"Use PVC label selectors to effortlessly specify the application resources that need protection. You can also create a custom PVC label selector if one doesn’t exists. For more information, ": "Use PVC label selectors to effortlessly specify the application resources that need protection. You can also create a custom PVC label selector if one doesn’t exists. For more information, ",
"Use Same Namespace SCC accross peers": "Use Same Namespace SCC accross peers",
"Use subvolumes to find pods with poor performing workloads.": "Use subvolumes to find pods with poor performing workloads.",
"Use the default OVN network for all internal communication.": "Use the default OVN network for all internal communication.",
"Use the host network to allow external access, support custom networking, or connect additional clusters to the storage provider. If no networks are specified, the default network will be used.": "Use the host network to allow external access, support custom networking, or connect additional clusters to the storage provider. If no networks are specified, the default network will be used.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum EnrollDiscoveredApplicationStateType {
SET_PVC_LABEL_EXPRESSIONS = 'CONFIGURATION/RESOURCE_LABEL/SET_PVC_LABEL_EXPRESSIONS',
SET_POLICY = 'REPLICATION/SET_POLICY',
SET_K8S_RESOURCE_REPLICATION_INTERVAL = 'REPLICATION/SET_K8S_RESOURCE_REPLICATION_INTERVAL',
SET_RETAIN_NAMESPACE_SCC = 'REPLICATION/SET_RETAIN_NAMESPACE_SCC',
SET_NAME = 'NAMESPACE/SET_NAME',
}

Expand Down Expand Up @@ -51,6 +52,7 @@ export type EnrollDiscoveredApplicationState = {
replication: {
drPolicy: DRPolicyKind;
k8sResourceReplicationInterval: string;
retainNamespaceSCC: boolean;
};
};

Expand Down Expand Up @@ -82,6 +84,7 @@ export const initialState: EnrollDiscoveredApplicationState = {
replication: {
drPolicy: {},
k8sResourceReplicationInterval: '5m',
retainNamespaceSCC: false,
},
};

Expand Down Expand Up @@ -123,6 +126,10 @@ export type EnrollDiscoveredApplicationAction =
type: EnrollDiscoveredApplicationStateType.SET_K8S_RESOURCE_REPLICATION_INTERVAL;
payload: string;
}
| {
type: EnrollDiscoveredApplicationStateType.SET_RETAIN_NAMESPACE_SCC;
payload: boolean;
}
| {
type: EnrollDiscoveredApplicationStateType.SET_NAME;
payload: string;
Expand Down Expand Up @@ -236,6 +243,15 @@ export const reducer: EnrollReducer = (state, action) => {
},
};
}
case EnrollDiscoveredApplicationStateType.SET_RETAIN_NAMESPACE_SCC: {
return {
...state,
replication: {
...state.replication,
retainNamespaceSCC: action.payload,
},
};
}
case EnrollDiscoveredApplicationStateType.SET_NAME: {
return {
...state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import {
Content,
ContentVariants,
SelectOption,
Checkbox,
Alert,
AlertVariant,
} from '@patternfly/react-core';

// Get Policy Dropdown Options
Expand Down Expand Up @@ -118,6 +121,9 @@ export const ReplicationSelectionHelper: React.FC<
onK8sSyncIntervalChange,
onPolicyChange,
isDisable,
retainNamespaceSCCAcrossPeers,
retainNamespaceSCC,
onRetainNamespaceSCCChange,
}) => {
const { t } = useCustomTranslation();
const SyncScheduleFormat = SYNC_SCHEDULE_DISPLAY_TEXT(t);
Expand Down Expand Up @@ -165,6 +171,30 @@ export const ReplicationSelectionHelper: React.FC<
isInputDisabled={isDisable}
/>
</FormGroup>
<Checkbox
id="Namespace-scc"
label={t('Use Same Namespace SCC accross peers')}
description={t(
'A Namespace with same SELinux/Annotations is automatically created on the destination cluster when the application is enrolled'
)}
isChecked={retainNamespaceSCC}
onChange={(_event, checked) => onRetainNamespaceSCCChange?.(checked)}
isDisabled={!retainNamespaceSCCAcrossPeers}
/>
{!retainNamespaceSCCAcrossPeers && (
<Alert
className="odf-alert pf-v6-u-mt-sm"
title={t(
'The retainNamespaceSCCAcrossPeers flag is disabled in the RamenConfig.'
)}
variant={AlertVariant.info}
isInline
>
{t(
'This flag must be enabled before it can be used of enrolled applications.'
)}
</Alert>
)}
</FormSection>
</Form>
);
Expand All @@ -187,6 +217,9 @@ type ReplicationSelectionHelperProps = {
onPolicyChange: (policyName: string) => void;
onK8sSyncIntervalChange: (syncInterval: string) => void;
isDisable?: boolean;
retainNamespaceSCCAcrossPeers?: boolean;
retainNamespaceSCC?: boolean;
onRetainNamespaceSCCChange?: (checked: boolean) => void;
};

type PolicySelectionProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export const ReplicationSelection: React.FC<ReplicationSelectionProps> = ({
dispatch,
}) => {
const { clusterName } = state.namespace;
const { drPolicy, k8sResourceReplicationInterval } = state.replication;
const { drPolicy, k8sResourceReplicationInterval, retainNamespaceSCC } =
state.replication;

const [drPolicies, loaded, loadError] =
useK8sList<DRPolicyKind>(DRPolicyModel);
Expand Down Expand Up @@ -66,6 +67,13 @@ export const ReplicationSelection: React.FC<ReplicationSelectionProps> = ({
});
};

const setRetainNamespaceSCC = (checked: boolean) => {
dispatch({
type: EnrollDiscoveredApplicationStateType.SET_RETAIN_NAMESPACE_SCC,
payload: checked,
});
};

return loaded && !loadError ? (
<ReplicationSelectionHelper
policy={convertToPolicyInfo(drPolicy)}
Expand All @@ -74,6 +82,8 @@ export const ReplicationSelection: React.FC<ReplicationSelectionProps> = ({
isValidationEnabled={isValidationEnabled}
onK8sSyncIntervalChange={setK8sSyncInterval}
onPolicyChange={setSelectedPolicy}
retainNamespaceSCC={retainNamespaceSCC}
onRetainNamespaceSCCChange={setRetainNamespaceSCC}
/>
) : (
<StatusBox loaded={loaded} loadError={loadError} />
Expand Down
1 change: 1 addition & 0 deletions packages/mco/types/ramen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,5 @@ export type S3StoreProfile = {

export type RamenConfig = {
s3StoreProfiles: S3StoreProfile[];
retainNamespaceSCCAcrossPeers?: boolean;
};
Loading