Removed system probe creation and updated lib images (#4203)
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
This commit is contained in:
parent
dc5757c1d5
commit
48c2ee0977
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@ import type { AddProbeRequest } from '@api/core';
|
|||
import { InfrastructureType, ProbeType } from '@api/entities';
|
||||
|
||||
const sourceObj = {
|
||||
image: 'chaosnative/chaos-go-runner:ci',
|
||||
image: 'litmuschaos/go-runner:latest',
|
||||
inheritInputs: true
|
||||
};
|
||||
|
||||
|
|
|
@ -982,7 +982,7 @@ export class KubernetesYamlService extends ExperimentYamlService {
|
|||
): Promise<ChaosEngine | undefined> {
|
||||
try {
|
||||
const experiment = await (await this.db).get(ChaosObjectStoreNameMap.EXPERIMENTS, key);
|
||||
const imageRegistry = experiment?.imageRegistry?.repo ?? 'chaosnative';
|
||||
const imageRegistry = experiment?.imageRegistry?.repo ?? 'litmuschaos';
|
||||
const experimentImagePullSecrets = experiment?.imageRegistry?.secret
|
||||
? {
|
||||
experimentImagePullSecrets: [{ name: experiment.imageRegistry.secret }]
|
||||
|
@ -1013,7 +1013,7 @@ export class KubernetesYamlService extends ExperimentYamlService {
|
|||
...envs,
|
||||
{
|
||||
name: 'LIB_IMAGE',
|
||||
value: defaultCMDProbe?.['source']?.image?.replace('chaosnative', imageRegistry)
|
||||
value: defaultCMDProbe?.['source']?.image?.replace('litmuschaos', imageRegistry)
|
||||
}
|
||||
],
|
||||
...experimentImagePullSecrets
|
||||
|
@ -1023,7 +1023,7 @@ export class KubernetesYamlService extends ExperimentYamlService {
|
|||
defaultCMDProbe['source'] = {
|
||||
...defaultCMDProbe['source'],
|
||||
...probeImagePullSecrets,
|
||||
image: defaultCMDProbe['source']?.image?.replace('chaosnative', imageRegistry)
|
||||
image: defaultCMDProbe['source']?.image?.replace('litmuschaos', imageRegistry)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ noProbeExecution: No Probe executions found
|
|||
noProbeExecutionDetails:
|
||||
subtitle: >-
|
||||
Probes are pluggable checks that can be defined within the ChaosEngine for
|
||||
any Chaos Experiment
|
||||
any Chaos Fault
|
||||
title: There are no executions for the selected probe in your project
|
||||
noProbes: No probes configured
|
||||
noProbesAvailable: No Probes available for this node
|
||||
|
|
|
@ -19,7 +19,7 @@ function kubernetesBlankCanvasTemplate(
|
|||
chaosInfrastructureNamespace?: string,
|
||||
_serviceAccount?: string,
|
||||
imageRegistry: ImageRegistry = {
|
||||
repo: 'chaosnative',
|
||||
repo: 'litmuschaos',
|
||||
secret: ''
|
||||
}
|
||||
): KubernetesExperimentManifest {
|
||||
|
|
|
@ -6,12 +6,9 @@ import { useHistory } from 'react-router-dom';
|
|||
import noProbes from '@images/noProbes.svg';
|
||||
import { useStrings } from '@strings';
|
||||
import { ParentComponentErrorWrapper } from '@errors';
|
||||
import { useRouteWithBaseUrl, useSearchParams } from '@hooks';
|
||||
import { getScope } from '@utils';
|
||||
import { useRouteWithBaseUrl } from '@hooks';
|
||||
import type { AddProbeRequest, AddProbeResponse } from '@api/core';
|
||||
import { InfrastructureType } from '@api/entities';
|
||||
import Loader from '@components/Loader';
|
||||
import { KUBERENTES_SYSTEM_PROBE_CONFIG } from '@constants/SystemProbe';
|
||||
import RbacButton from '@components/RbacButton';
|
||||
import { PermissionGroup } from '@models';
|
||||
import css from './SelectProbesTab.module.scss';
|
||||
|
@ -21,27 +18,11 @@ interface NoProbesProps {
|
|||
addKubernetesCMDProbeMutation: MutationFunction<AddProbeResponse, AddProbeRequest>;
|
||||
}
|
||||
|
||||
export default function NoProbes({ loading, addKubernetesCMDProbeMutation }: NoProbesProps): React.ReactElement {
|
||||
const scope = getScope();
|
||||
export default function NoProbes({ loading }: NoProbesProps): React.ReactElement {
|
||||
const history = useHistory();
|
||||
const paths = useRouteWithBaseUrl();
|
||||
const searchParams = useSearchParams();
|
||||
const infrastructureType = searchParams.get('infrastructureType') as InfrastructureType;
|
||||
const { getString } = useStrings();
|
||||
|
||||
const createSystemProbe = (): void => {
|
||||
// Request Payload for Add
|
||||
const addProbePayload: AddProbeRequest = {
|
||||
projectID: scope.projectID,
|
||||
request: KUBERENTES_SYSTEM_PROBE_CONFIG
|
||||
};
|
||||
|
||||
if (infrastructureType === InfrastructureType.KUBERNETES)
|
||||
addKubernetesCMDProbeMutation({
|
||||
variables: addProbePayload
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Loader loading={loading} height="var(--page-min-height)">
|
||||
<Container className={css.noProbes}>
|
||||
|
@ -64,15 +45,6 @@ export default function NoProbes({ loading, addKubernetesCMDProbeMutation }: NoP
|
|||
</Text>
|
||||
<Layout.Vertical spacing={'medium'} flex={{ justifyContent: 'center' }}>
|
||||
<Layout.Horizontal spacing={'medium'}>
|
||||
<ParentComponentErrorWrapper>
|
||||
<RbacButton
|
||||
permission={PermissionGroup.EDITOR || PermissionGroup.OWNER}
|
||||
variation={ButtonVariation.PRIMARY}
|
||||
text={getString('addSystemProbe')}
|
||||
icon="plus"
|
||||
onClick={createSystemProbe}
|
||||
/>
|
||||
</ParentComponentErrorWrapper>
|
||||
<ParentComponentErrorWrapper>
|
||||
<RbacButton
|
||||
permission={PermissionGroup.EDITOR || PermissionGroup.OWNER}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td> TARGET_HOSTNAMES </td>
|
||||
<td> List of the target hostnames or keywords eg. '["litmuschaos","chaosnative.com"]'</td>
|
||||
<td> List of the target hostnames or keywords eg. '["litmuschaos"]'</td>
|
||||
<td> If not provided, all hostnames/domains will be targeted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -219,7 +219,7 @@ spec:
|
|||
## comma separated list of host names
|
||||
## if not provided, all hostnames/domains will be targeted
|
||||
- name: TARGET_HOSTNAMES
|
||||
value: '["litmuschaos","chaosnative.com"]'
|
||||
value: '["litmuschaos"]'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60'
|
||||
```
|
||||
|
|
|
@ -19,6 +19,6 @@ spec:
|
|||
## comma separated list of host names
|
||||
## if not provided, all hostnames/domains will be targeted
|
||||
- name: TARGET_HOSTNAMES
|
||||
value: '["litmuschaos","chaosnative.com"]'
|
||||
value: '["litmuschaos"]'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60'
|
||||
|
|
Loading…
Reference in New Issue