diff --git a/chaoscenter/web/src/components/PredefinedExperimentCard/__tests__/PredefinedExperiemntCard.test.tsx b/chaoscenter/web/src/components/PredefinedExperimentCard/__tests__/PredefinedExperiemntCard.test.tsx index f97cfb7b7..e942dc73f 100644 --- a/chaoscenter/web/src/components/PredefinedExperimentCard/__tests__/PredefinedExperiemntCard.test.tsx +++ b/chaoscenter/web/src/components/PredefinedExperimentCard/__tests__/PredefinedExperiemntCard.test.tsx @@ -25,7 +25,7 @@ const getPredefinedWorkflowResponse: PredefinedExperiment[] = [ experimentCSV: 'apiVersion: litmuchaos.io/v1alpha1\nkind: ChartServiceVersion\nmetadata:\n name: aws-ecs-instance-stop\n version: 0.1.0\n annotations:\n categories: aws-ecs-instance-stop\n chartDescription: Injects ec2 stop on the instance that runs a given task for a specified duration \nspec:\n displayName: aws-ecs-instance-stop\n categoryDescription: >\n Injects ec2 stop on the instance that runs a given task for a specified duration\n faults:\n - name: ecs-instance-stop\n description: Injects ec2 stop on the instance that runs a given task for a specified duration\n keywords:\n - AWS\n platforms:\n - GKE\n - Minikube \n - Packet(Kubeadm)\n - EKS\n - AKS\n icon:\n - url:\n mediatype: ""\n', experimentManifest: - 'kind: Workflow\napiVersion: argoproj.io/v1alpha1\nmetadata:\n name: ecs-instance-stop-1658150276\n namespace: litmus\n creationTimestamp: null\n labels:\n subject: ecs-instance-stop_litmus\nspec:\n templates:\n - name: custom-chaos\n steps:\n - - name: install-chaos-faults\n template: install-chaos-faults\n - - name: ecs-instance-stop-ol7\n template: ecs-instance-stop-ol7\n - - name: cleanup-chaos-resources\n template: cleanup-chaos-resources\n - name: install-chaos-faults\n inputs:\n artifacts:\n - name: ecs-instance-stop-ol7\n path: /tmp/ecs-instance-stop-ol7.yaml\n raw:\n data: >\n apiVersion: litmuschaos.io/v1alpha1\n\n description:\n message: |\n\n kind: ChaosExperiment\n\n metadata:\n name: ecs-instance-stop\n labels:\n name: ecs-instance-stop\n app.kubernetes.io/part-of: litmus\n app.kubernetes.io/component: chaosexperiment\n app.kubernetes.io/version: ci\n spec:\n definition:\n scope: Namespaced\n permissions:\n - apiGroups:\n - ""\n resources:\n - pods\n verbs:\n - create\n - delete\n - get\n - list\n - patch\n - update\n - deletecollection\n - apiGroups:\n - ""\n resources:\n - events\n verbs:\n - create\n - get\n - list\n - patch\n - update\n - apiGroups:\n - ""\n resources:\n - configmaps\n verbs:\n - get\n - list\n - apiGroups:\n - ""\n resources:\n - pods/log\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - ""\n resources:\n - pods/exec\n verbs:\n - get\n - list\n - create\n - apiGroups:\n - apps\n resources:\n - deployments\n - statefulsets\n - replicasets\n - daemonsets\n verbs:\n - list\n - get\n - apiGroups:\n - apps.openshift.io\n resources:\n - deploymentconfigs\n verbs:\n - list\n - get\n - apiGroups:\n - ""\n resources:\n - replicationcontrollers\n verbs:\n - get\n - list\n - apiGroups:\n - argoproj.io\n resources:\n - rollouts\n verbs:\n - list\n - get\n - apiGroups:\n - batch\n resources:\n - jobs\n verbs:\n - create\n - list\n - get\n - delete\n - deletecollection\n - apiGroups:\n - litmuschaos.io\n resources:\n - chaosengines\n - chaosexperiments\n - chaosresults\n verbs:\n - create\n - list\n - get\n - patch\n - update\n - delete\n image: chaosnative/go-runner:ci\n imagePullPolicy: Always\n args:\n - -c\n - ./experiments -name ecs-instance-stop\n command:\n - /bin/bash\n env:\n - name: TOTAL_CHAOS_DURATION\n value: "30"\n - name: RAMP_TIME\n value: ""\n - name: CHAOS_INTERVAL\n value: "10"\n - name: LIB\n value: litmus\n - name: MANAGED_NODEGROUP\n value: enable\n - name: AWS_SHARED_CREDENTIALS_FILE\n value: /tmp/cloud_config.yml\n - name: DEFAULT_HEALTH_CHECK\n value: \'false\'\n labels:\n name: ecs-instance-stop\n app.kubernetes.io/part-of: litmus\n app.kubernetes.io/component: experiment-job\n app.kubernetes.io/version: ci\n secrets:\n - name: cloud-secret\n mountPath: /tmp/\n container:\n name: ""\n image: docker.io/chaosnative/k8s:2.13.0\n command:\n - sh\n - -c\n args:\n - kubectl apply -f /tmp/ecs-instance-stop-ol7.yaml -n\n {{workflow.parameters.adminModeNamespace}} && sleep 30\n - name: ecs-instance-stop-ol7\n inputs:\n artifacts:\n - name: ecs-instance-stop-ol7\n path: /tmp/chaosengine-ecs-instance-stop-ol7.yaml\n raw:\n data: |\n apiVersion: litmuschaos.io/v1alpha1\n kind: ChaosEngine\n metadata:\n namespace: "{{workflow.parameters.adminModeNamespace}}"\n generateName: ecs-instance-stop-ol7\n labels:\n instance_id: 422b11be-5be6-4a79-b431-734c6b05cc29\n context: ecs-instance-stop-ol7_litmus\n workflow_name: ecs-instance-stop-1658150276\n spec:\n engineState: active\n chaosServiceAccount: litmus-admin\n experiments:\n - name: ecs-instance-stop\n spec:\n components:\n env:\n - name: TOTAL_CHAOS_DURATION\n value: "30"\n - name: CHAOS_INTERVAL\n value: "10"\n - name: CLUSTER_NAME\n value: ""\n - name: REGION\n value: ""\n - name: EC2_INSTANCE_ID\n value: ""\n - name: SEQUENCE\n value: parallel\n probe:\n - name: healthcheck\n type: cmdProbe\n mode: SOT\n runProperties:\n probeTimeout: 10\n retry: 0\n interval: 1\n stopOnFailure: true\n cmdProbe/inputs:\n command: ./healthcheck -name aws-ecs-instance-stop\n source:\n image: chaosnative/go-runner:ci\n inheritInputs: true\n comparator:\n type: string\n criteria: contains\n value: "[P000]"\n annotationCheck: "false"\n metadata:\n labels:\n weight: "10"\n container:\n name: ""\n image: docker.io/chaosnative/litmus-checker:2.13.0\n args:\n - -file=/tmp/chaosengine-ecs-instance-stop-ol7.yaml\n - -saveName=/tmp/engine-name\n - name: cleanup-chaos-resources\n container:\n name: ""\n image: litmuschaos/k8s:latest\n command:\n - sh\n - -c\n args:\n - "kubectl delete chaosengine -l \'instance_id in\n (422b11be-5be6-4a79-b431-734c6b05cc29, )\' -n\n {{workflow.parameters.adminModeNamespace}} "\n entrypoint: custom-chaos\n arguments:\n parameters:\n - name: adminModeNamespace\n value: litmus\n serviceAccountName: argo-chaos\n securityContext:\n runAsUser: 1000\n runAsNonRoot: true', + 'kind: Workflow\napiVersion: argoproj.io/v1alpha1\nmetadata:\n name: ecs-instance-stop-1658150276\n namespace: litmus\n creationTimestamp: null\n labels:\n subject: ecs-instance-stop_litmus\nspec:\n templates:\n - name: custom-chaos\n steps:\n - - name: install-chaos-faults\n template: install-chaos-faults\n - - name: ecs-instance-stop-ol7\n template: ecs-instance-stop-ol7\n - - name: cleanup-chaos-resources\n template: cleanup-chaos-resources\n - name: install-chaos-faults\n inputs:\n artifacts:\n - name: ecs-instance-stop-ol7\n path: /tmp/ecs-instance-stop-ol7.yaml\n raw:\n data: >\n apiVersion: litmuschaos.io/v1alpha1\n\n description:\n message: |\n\n kind: ChaosExperiment\n\n metadata:\n name: ecs-instance-stop\n labels:\n name: ecs-instance-stop\n app.kubernetes.io/part-of: litmus\n app.kubernetes.io/component: chaosexperiment\n app.kubernetes.io/version: ci\n spec:\n definition:\n scope: Namespaced\n permissions:\n - apiGroups:\n - ""\n resources:\n - pods\n verbs:\n - create\n - delete\n - get\n - list\n - patch\n - update\n - deletecollection\n - apiGroups:\n - ""\n resources:\n - events\n verbs:\n - create\n - get\n - list\n - patch\n - update\n - apiGroups:\n - ""\n resources:\n - configmaps\n verbs:\n - get\n - list\n - apiGroups:\n - ""\n resources:\n - pods/log\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - ""\n resources:\n - pods/exec\n verbs:\n - get\n - list\n - create\n - apiGroups:\n - apps\n resources:\n - deployments\n - statefulsets\n - replicasets\n - daemonsets\n verbs:\n - list\n - get\n - apiGroups:\n - apps.openshift.io\n resources:\n - deploymentconfigs\n verbs:\n - list\n - get\n - apiGroups:\n - ""\n resources:\n - replicationcontrollers\n verbs:\n - get\n - list\n - apiGroups:\n - argoproj.io\n resources:\n - rollouts\n verbs:\n - list\n - get\n - apiGroups:\n - batch\n resources:\n - jobs\n verbs:\n - create\n - list\n - get\n - delete\n - deletecollection\n - apiGroups:\n - litmuschaos.io\n resources:\n - chaosengines\n - chaosexperiments\n - chaosresults\n verbs:\n - create\n - list\n - get\n - patch\n - update\n - delete\n image: litmuschaos/go-runner:latest\n imagePullPolicy: Always\n args:\n - -c\n - ./experiments -name ecs-instance-stop\n command:\n - /bin/bash\n env:\n - name: TOTAL_CHAOS_DURATION\n value: "30"\n - name: RAMP_TIME\n value: ""\n - name: CHAOS_INTERVAL\n value: "10"\n - name: LIB\n value: litmus\n - name: MANAGED_NODEGROUP\n value: enable\n - name: AWS_SHARED_CREDENTIALS_FILE\n value: /tmp/cloud_config.yml\n - name: DEFAULT_HEALTH_CHECK\n value: \'false\'\n labels:\n name: ecs-instance-stop\n app.kubernetes.io/part-of: litmus\n app.kubernetes.io/component: experiment-job\n app.kubernetes.io/version: ci\n secrets:\n - name: cloud-secret\n mountPath: /tmp/\n container:\n name: ""\n image: docker.io/chaosnative/k8s:2.13.0\n command:\n - sh\n - -c\n args:\n - kubectl apply -f /tmp/ecs-instance-stop-ol7.yaml -n\n {{workflow.parameters.adminModeNamespace}} && sleep 30\n - name: ecs-instance-stop-ol7\n inputs:\n artifacts:\n - name: ecs-instance-stop-ol7\n path: /tmp/chaosengine-ecs-instance-stop-ol7.yaml\n raw:\n data: |\n apiVersion: litmuschaos.io/v1alpha1\n kind: ChaosEngine\n metadata:\n namespace: "{{workflow.parameters.adminModeNamespace}}"\n generateName: ecs-instance-stop-ol7\n labels:\n instance_id: 422b11be-5be6-4a79-b431-734c6b05cc29\n context: ecs-instance-stop-ol7_litmus\n workflow_name: ecs-instance-stop-1658150276\n spec:\n engineState: active\n chaosServiceAccount: litmus-admin\n experiments:\n - name: ecs-instance-stop\n spec:\n components:\n env:\n - name: TOTAL_CHAOS_DURATION\n value: "30"\n - name: CHAOS_INTERVAL\n value: "10"\n - name: CLUSTER_NAME\n value: ""\n - name: REGION\n value: ""\n - name: EC2_INSTANCE_ID\n value: ""\n - name: SEQUENCE\n value: parallel\n probe:\n - name: healthcheck\n type: cmdProbe\n mode: SOT\n runProperties:\n probeTimeout: 10\n retry: 0\n interval: 1\n stopOnFailure: true\n cmdProbe/inputs:\n command: ./healthcheck -name aws-ecs-instance-stop\n source:\n image: litmuschaos/go-runner:latest\n inheritInputs: true\n comparator:\n type: string\n criteria: contains\n value: "[P000]"\n annotationCheck: "false"\n metadata:\n labels:\n weight: "10"\n container:\n name: ""\n image: docker.io/chaosnative/litmus-checker:2.13.0\n args:\n - -file=/tmp/chaosengine-ecs-instance-stop-ol7.yaml\n - -saveName=/tmp/engine-name\n - name: cleanup-chaos-resources\n container:\n name: ""\n image: litmuschaos/k8s:latest\n command:\n - sh\n - -c\n args:\n - "kubectl delete chaosengine -l \'instance_id in\n (422b11be-5be6-4a79-b431-734c6b05cc29, )\' -n\n {{workflow.parameters.adminModeNamespace}} "\n entrypoint: custom-chaos\n arguments:\n parameters:\n - name: adminModeNamespace\n value: litmus\n serviceAccountName: argo-chaos\n securityContext:\n runAsUser: 1000\n runAsNonRoot: true', experimentName: 'aws-ecs-instance-stop' } ]; diff --git a/chaoscenter/web/src/constants/SystemProbe.ts b/chaoscenter/web/src/constants/SystemProbe.ts index c6469e458..55c005226 100644 --- a/chaoscenter/web/src/constants/SystemProbe.ts +++ b/chaoscenter/web/src/constants/SystemProbe.ts @@ -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 }; diff --git a/chaoscenter/web/src/services/experiment/KubernetesYamlService.ts b/chaoscenter/web/src/services/experiment/KubernetesYamlService.ts index 8de83821c..43a54c6b7 100644 --- a/chaoscenter/web/src/services/experiment/KubernetesYamlService.ts +++ b/chaoscenter/web/src/services/experiment/KubernetesYamlService.ts @@ -982,7 +982,7 @@ export class KubernetesYamlService extends ExperimentYamlService { ): Promise { 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) }; } diff --git a/chaoscenter/web/src/strings/strings.en.yaml b/chaoscenter/web/src/strings/strings.en.yaml index 366b7b597..a5b870425 100644 --- a/chaoscenter/web/src/strings/strings.en.yaml +++ b/chaoscenter/web/src/strings/strings.en.yaml @@ -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 diff --git a/chaoscenter/web/src/views/ExperimentBuilderTemplateSelection/blankCanvasTemplate.ts b/chaoscenter/web/src/views/ExperimentBuilderTemplateSelection/blankCanvasTemplate.ts index ca248e491..6f13e4a8e 100644 --- a/chaoscenter/web/src/views/ExperimentBuilderTemplateSelection/blankCanvasTemplate.ts +++ b/chaoscenter/web/src/views/ExperimentBuilderTemplateSelection/blankCanvasTemplate.ts @@ -19,7 +19,7 @@ function kubernetesBlankCanvasTemplate( chaosInfrastructureNamespace?: string, _serviceAccount?: string, imageRegistry: ImageRegistry = { - repo: 'chaosnative', + repo: 'litmuschaos', secret: '' } ): KubernetesExperimentManifest { diff --git a/chaoscenter/web/src/views/ExperimentCreationFaultConfiguration/Tabs/Probes/SelectProbesTab/NoProbes.tsx b/chaoscenter/web/src/views/ExperimentCreationFaultConfiguration/Tabs/Probes/SelectProbesTab/NoProbes.tsx index bd21e4850..3c77c0924 100644 --- a/chaoscenter/web/src/views/ExperimentCreationFaultConfiguration/Tabs/Probes/SelectProbesTab/NoProbes.tsx +++ b/chaoscenter/web/src/views/ExperimentCreationFaultConfiguration/Tabs/Probes/SelectProbesTab/NoProbes.tsx @@ -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; } -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 ( @@ -64,15 +45,6 @@ export default function NoProbes({ loading, addKubernetesCMDProbeMutation }: NoP - - - TARGET_HOSTNAMES - List of the target hostnames or keywords eg. '["litmuschaos","chaosnative.com"]' + List of the target hostnames or keywords eg. '["litmuschaos"]' If not provided, all hostnames/domains will be targeted @@ -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' ``` diff --git a/mkdocs/docs/experiments/categories/pods/pod-dns-error/target-hostnames.yaml b/mkdocs/docs/experiments/categories/pods/pod-dns-error/target-hostnames.yaml index 2e0ef2835..948261811 100644 --- a/mkdocs/docs/experiments/categories/pods/pod-dns-error/target-hostnames.yaml +++ b/mkdocs/docs/experiments/categories/pods/pod-dns-error/target-hostnames.yaml @@ -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'