Skip to content

Commit

Permalink
Removed system probe creation and updated lib images (#4203)
Browse files Browse the repository at this point in the history
Signed-off-by: Saranya-jena <[email protected]>
  • Loading branch information
Saranya-jena authored Oct 3, 2023
1 parent dc5757c commit 48c2ee0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 40 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion chaoscenter/web/src/constants/SystemProbe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }]
Expand Down Expand Up @@ -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
Expand All @@ -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)
};
}

Expand Down
2 changes: 1 addition & 1 deletion chaoscenter/web/src/strings/strings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function kubernetesBlankCanvasTemplate(
chaosInfrastructureNamespace?: string,
_serviceAccount?: string,
imageRegistry: ImageRegistry = {
repo: 'chaosnative',
repo: 'litmuschaos',
secret: ''
}
): KubernetesExperimentManifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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}>
Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions mkdocs/docs/experiments/categories/pods/pod-dns-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 48c2ee0

Please sign in to comment.