Version updates, readme fixes, manifest fixes, env. for argo's container runtime executor and bug fixes for Okteto dev. env. setup. (#2717)
* fix for frontend svc port on okteto * fix for prod. frontend svc port on okteto * adding missing envs. * update to cluster scope. * fixed bugs and added env for container runtime executor * fixes and updates. * added the portal_scope env back and minor readme update. * minor fix Signed-off-by: ishangupta-ds <ishan@chaosnative.com>
This commit is contained in:
parent
46e71aebfc
commit
c947580814
|
@ -201,3 +201,4 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
component: database
|
component: database
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
||||||
app: chaos-exporter
|
app: chaos-exporter
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: litmuschaos/chaos-exporter:1.13.0
|
- image: litmuschaos/chaos-exporter:1.13.3
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: chaos-exporter
|
name: chaos-exporter
|
||||||
serviceAccountName: litmus
|
serviceAccountName: litmus
|
||||||
|
|
|
@ -181,6 +181,8 @@ spec:
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: INGRESS_NAME
|
- name: INGRESS_NAME
|
||||||
value: "litmus-ingress"
|
value: "litmus-ingress"
|
||||||
|
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||||
|
value: "k8sapi"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
@ -126,10 +126,6 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
- name: PORTAL_SCOPE
|
|
||||||
value: "namespace"
|
|
||||||
- name: PORTAL_ENDPOINT
|
|
||||||
value: "http://litmusportal-server-service:9002"
|
|
||||||
- name: SELF_CLUSTER
|
- name: SELF_CLUSTER
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: AGENT_SCOPE
|
- name: AGENT_SCOPE
|
||||||
|
@ -152,6 +148,10 @@ spec:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: litmus-portal-admin-config
|
name: litmus-portal-admin-config
|
||||||
key: DB_PASSWORD
|
key: DB_PASSWORD
|
||||||
|
- name: PORTAL_SCOPE
|
||||||
|
value: "namespace"
|
||||||
|
- name: PORTAL_ENDPOINT
|
||||||
|
value: "http://litmusportal-server-service:9002"
|
||||||
- name: SUBSCRIBER_IMAGE
|
- name: SUBSCRIBER_IMAGE
|
||||||
value: "litmuschaos/litmusportal-subscriber:2.0.0-Beta3"
|
value: "litmuschaos/litmusportal-subscriber:2.0.0-Beta3"
|
||||||
- name: EVENT_TRACKER_IMAGE
|
- name: EVENT_TRACKER_IMAGE
|
||||||
|
@ -168,6 +168,8 @@ spec:
|
||||||
value: "litmuschaos/chaos-runner:1.13.3"
|
value: "litmuschaos/chaos-runner:1.13.3"
|
||||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||||
value: "litmuschaos/chaos-exporter:1.13.3"
|
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||||
|
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||||
|
value: "k8sapi"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
@ -181,6 +181,8 @@ spec:
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: INGRESS_NAME
|
- name: INGRESS_NAME
|
||||||
value: "litmus-ingress"
|
value: "litmus-ingress"
|
||||||
|
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||||
|
value: "k8sapi"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
@ -3199,7 +3199,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
|
||||||
}
|
}
|
||||||
|
|
||||||
var sources = []*ast.Source{
|
var sources = []*ast.Source{
|
||||||
&ast.Source{Name: "graph/analytics.graphqls", Input: `input DSInput {
|
{Name: "graph/analytics.graphqls", Input: `input DSInput {
|
||||||
ds_id: String
|
ds_id: String
|
||||||
ds_name: String!
|
ds_name: String!
|
||||||
ds_type: String!
|
ds_type: String!
|
||||||
|
@ -3375,7 +3375,7 @@ input deleteDSInput {
|
||||||
force_delete: Boolean!
|
force_delete: Boolean!
|
||||||
ds_id: String!
|
ds_id: String!
|
||||||
}`, BuiltIn: false},
|
}`, BuiltIn: false},
|
||||||
&ast.Source{Name: "graph/myhub.graphqls", Input: `enum AuthType {
|
{Name: "graph/myhub.graphqls", Input: `enum AuthType {
|
||||||
none
|
none
|
||||||
basic
|
basic
|
||||||
token
|
token
|
||||||
|
@ -3549,7 +3549,7 @@ input UpdateMyHub {
|
||||||
SSHPublicKey: String
|
SSHPublicKey: String
|
||||||
}
|
}
|
||||||
`, BuiltIn: false},
|
`, BuiltIn: false},
|
||||||
&ast.Source{Name: "graph/project.graphqls", Input: `type Project {
|
{Name: "graph/project.graphqls", Input: `type Project {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
members: [Member!]!
|
members: [Member!]!
|
||||||
|
@ -3581,7 +3581,7 @@ enum MemberRole {
|
||||||
Viewer
|
Viewer
|
||||||
}
|
}
|
||||||
`, BuiltIn: false},
|
`, BuiltIn: false},
|
||||||
&ast.Source{Name: "graph/schema.graphqls", Input: `# GraphQL schema example
|
{Name: "graph/schema.graphqls", Input: `# GraphQL schema example
|
||||||
#
|
#
|
||||||
# https://gqlgen.com/getting-started/
|
# https://gqlgen.com/getting-started/
|
||||||
|
|
||||||
|
@ -4015,7 +4015,7 @@ type Subscription {
|
||||||
getKubeObject(kubeObjectRequest: KubeObjectRequest!): KubeObjectResponse! @authorized
|
getKubeObject(kubeObjectRequest: KubeObjectRequest!): KubeObjectResponse! @authorized
|
||||||
}
|
}
|
||||||
`, BuiltIn: false},
|
`, BuiltIn: false},
|
||||||
&ast.Source{Name: "graph/usermanagement.graphqls", Input: `type User {
|
{Name: "graph/usermanagement.graphqls", Input: `type User {
|
||||||
id: ID!
|
id: ID!
|
||||||
username: String!
|
username: String!
|
||||||
email: String
|
email: String
|
||||||
|
|
|
@ -6,6 +6,6 @@ metadata:
|
||||||
namespace: #{AGENT-NAMESPACE}
|
namespace: #{AGENT-NAMESPACE}
|
||||||
data:
|
data:
|
||||||
config: |
|
config: |
|
||||||
containerRuntimeExecutor: k8sapi
|
containerRuntimeExecutor: #{ARGO-CONTAINER-RUNTIME-EXECUTOR}
|
||||||
executor:
|
executor:
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
|
@ -8,7 +8,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-serviceaccount
|
app.kubernetes.io/component: operator-serviceaccount
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
@ -22,7 +22,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-clusterrole
|
app.kubernetes.io/component: operator-clusterrole
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
@ -45,10 +45,30 @@ rules:
|
||||||
verbs: ["get", "list"]
|
verbs: ["get", "list"]
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods", "configmaps", "events", "services"]
|
resources: ["pods", "configmaps", "events", "services"]
|
||||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
verbs:
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"patch",
|
||||||
|
"delete",
|
||||||
|
"list",
|
||||||
|
"watch",
|
||||||
|
"deletecollection",
|
||||||
|
]
|
||||||
- apiGroups: ["litmuschaos.io"]
|
- apiGroups: ["litmuschaos.io"]
|
||||||
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
||||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
verbs:
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"patch",
|
||||||
|
"delete",
|
||||||
|
"list",
|
||||||
|
"watch",
|
||||||
|
"deletecollection",
|
||||||
|
]
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
@ -58,7 +78,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-clusterrolebinding
|
app.kubernetes.io/component: operator-clusterrolebinding
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator
|
app.kubernetes.io/component: operator
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
||||||
namespace: #{AGENT-NAMESPACE}
|
namespace: #{AGENT-NAMESPACE}
|
||||||
data:
|
data:
|
||||||
config: |
|
config: |
|
||||||
containerRuntimeExecutor: k8sapi
|
containerRuntimeExecutor: #{ARGO-CONTAINER-RUNTIME-EXECUTOR}
|
||||||
executor:
|
executor:
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
|
|
|
@ -8,7 +8,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-serviceaccount
|
app.kubernetes.io/component: operator-serviceaccount
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
@ -23,7 +23,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-role
|
app.kubernetes.io/component: operator-role
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
@ -46,10 +46,30 @@ rules:
|
||||||
verbs: ["get", "list"]
|
verbs: ["get", "list"]
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods", "pods/exec", "configmaps", "events", "services"]
|
resources: ["pods", "pods/exec", "configmaps", "events", "services"]
|
||||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
verbs:
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"patch",
|
||||||
|
"delete",
|
||||||
|
"list",
|
||||||
|
"watch",
|
||||||
|
"deletecollection",
|
||||||
|
]
|
||||||
- apiGroups: ["litmuschaos.io"]
|
- apiGroups: ["litmuschaos.io"]
|
||||||
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
||||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
verbs:
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"patch",
|
||||||
|
"delete",
|
||||||
|
"list",
|
||||||
|
"watch",
|
||||||
|
"deletecollection",
|
||||||
|
]
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
|
@ -60,7 +80,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator-rolebinding
|
app.kubernetes.io/component: operator-rolebinding
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
||||||
app.kubernetes.io/name: litmus
|
app.kubernetes.io/name: litmus
|
||||||
# provide unique instance-id if applicable
|
# provide unique instance-id if applicable
|
||||||
# app.kubernetes.io/instance: litmus-abcxzy
|
# app.kubernetes.io/instance: litmus-abcxzy
|
||||||
app.kubernetes.io/version: v1.12.0
|
app.kubernetes.io/version: v1.13.3
|
||||||
app.kubernetes.io/component: operator
|
app.kubernetes.io/component: operator
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/managed-by: kubectl
|
app.kubernetes.io/managed-by: kubectl
|
||||||
|
|
|
@ -25,6 +25,7 @@ var subscriberConfiguration = &types.SubscriberConfigurationVars{
|
||||||
WorkflowExecutorImage: os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE"),
|
WorkflowExecutorImage: os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE"),
|
||||||
ChaosRunnerImage: os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE"),
|
ChaosRunnerImage: os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE"),
|
||||||
ChaosExporterImage: os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE"),
|
ChaosExporterImage: os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE"),
|
||||||
|
ContainerRuntimeExecutor: os.Getenv("CONTAINER_RUNTIME_EXECUTOR"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileHandler dynamically generates the manifest file and sends it as a response
|
// FileHandler dynamically generates the manifest file and sends it as a response
|
||||||
|
@ -62,7 +63,7 @@ func GetManifest(token string) ([]byte, int, error) {
|
||||||
return nil, 500, err
|
return nil, 500, err
|
||||||
}
|
}
|
||||||
} else if os.Getenv("PORTAL_SCOPE") == "namespace" {
|
} else if os.Getenv("PORTAL_SCOPE") == "namespace" {
|
||||||
subscriberConfiguration.GQLServerURI = os.Getenv("PORTAL_ENDPOINT")
|
subscriberConfiguration.GQLServerURI = os.Getenv("PORTAL_ENDPOINT") + "/query"
|
||||||
}
|
}
|
||||||
|
|
||||||
if !reqCluster.IsRegistered {
|
if !reqCluster.IsRegistered {
|
||||||
|
|
|
@ -13,4 +13,5 @@ type SubscriberConfigurationVars struct {
|
||||||
WorkflowExecutorImage string
|
WorkflowExecutorImage string
|
||||||
ChaosRunnerImage string
|
ChaosRunnerImage string
|
||||||
ChaosExporterImage string
|
ChaosExporterImage string
|
||||||
|
ContainerRuntimeExecutor string
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,11 @@ import (
|
||||||
|
|
||||||
const defaultPort = "8080"
|
const defaultPort = "8080"
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.Printf("Go Version: %s", runtime.Version())
|
log.Printf("Go Version: %s", runtime.Version())
|
||||||
log.Printf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)
|
log.Printf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)
|
||||||
|
|
||||||
if os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE") == "" || os.Getenv("SUBSCRIBER_IMAGE") == "" || os.Getenv("ARGO_SERVER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("JWT_SECRET") == "" || os.Getenv("PORTAL_SCOPE") == "" {
|
if os.Getenv("DB_SERVER") == "" || os.Getenv("JWT_SECRET") == "" || os.Getenv("SELF_CLUSTER") == "" || os.Getenv("AGENT_SCOPE") == "" || os.Getenv("AGENT_NAMESPACE") == "" || os.Getenv("LITMUS_PORTAL_NAMESPACE") == "" || os.Getenv("DB_USER") == "" || os.Getenv("DB_PASSWORD") == "" || os.Getenv("PORTAL_SCOPE") == "" || os.Getenv("SUBSCRIBER_IMAGE") == "" || os.Getenv("EVENT_TRACKER_IMAGE") == "" || os.Getenv("ARGO_SERVER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_CONTROLLER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE") == "" || os.Getenv("CONTAINER_RUNTIME_EXECUTOR") == "" {
|
||||||
log.Fatal("Some environment variable are not setup")
|
log.Fatal("Some environment variable are not setup")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ func ManifestParser(cluster dbSchemaCluster.Cluster, rootPath string, subscriber
|
||||||
newContent = strings.Replace(newContent, "#{ARGO-WORKFLOW-EXECUTOR}", subscriberConfig.WorkflowExecutorImage, -1)
|
newContent = strings.Replace(newContent, "#{ARGO-WORKFLOW-EXECUTOR}", subscriberConfig.WorkflowExecutorImage, -1)
|
||||||
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-RUNNER}", subscriberConfig.ChaosRunnerImage, -1)
|
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-RUNNER}", subscriberConfig.ChaosRunnerImage, -1)
|
||||||
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-EXPORTER}", subscriberConfig.ChaosExporterImage, -1)
|
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-EXPORTER}", subscriberConfig.ChaosExporterImage, -1)
|
||||||
|
newContent = strings.Replace(newContent, "#{ARGO-CONTAINER-RUNTIME-EXECUTOR}", subscriberConfig.ContainerRuntimeExecutor, -1)
|
||||||
|
|
||||||
generatedYAML = append(generatedYAML, newContent)
|
generatedYAML = append(generatedYAML, newContent)
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,10 +126,6 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
- name: PORTAL_SCOPE
|
|
||||||
value: "namespace"
|
|
||||||
- name: PORTAL_ENDPOINT
|
|
||||||
value: "http://litmusportal-server-service:9002"
|
|
||||||
- name: SELF_CLUSTER
|
- name: SELF_CLUSTER
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: AGENT_SCOPE
|
- name: AGENT_SCOPE
|
||||||
|
@ -152,6 +148,10 @@ spec:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: litmus-portal-admin-config
|
name: litmus-portal-admin-config
|
||||||
key: DB_PASSWORD
|
key: DB_PASSWORD
|
||||||
|
- name: PORTAL_SCOPE
|
||||||
|
value: "namespace"
|
||||||
|
- name: PORTAL_ENDPOINT
|
||||||
|
value: "http://litmusportal-server-service:9002"
|
||||||
- name: SUBSCRIBER_IMAGE
|
- name: SUBSCRIBER_IMAGE
|
||||||
value: "litmuschaos/litmusportal-subscriber:ci"
|
value: "litmuschaos/litmusportal-subscriber:ci"
|
||||||
- name: EVENT_TRACKER_IMAGE
|
- name: EVENT_TRACKER_IMAGE
|
||||||
|
@ -168,6 +168,8 @@ spec:
|
||||||
value: "litmuschaos/chaos-runner:1.13.3"
|
value: "litmuschaos/chaos-runner:1.13.3"
|
||||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||||
value: "litmuschaos/chaos-exporter:1.13.3"
|
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||||
|
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||||
|
value: "k8sapi"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
This directory contains setup guide to start developing Litmus Portal on Okteto cloud.
|
This directory contains setup guide to start developing Litmus Portal on Okteto cloud.
|
||||||
|
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Install `kubectl` for `kubernetes` from [here](https://kubernetes.io/docs/tasks/tools/install-kubectl)
|
- Install `kubectl` for `kubernetes` from [here](https://kubernetes.io/docs/tasks/tools/install-kubectl)
|
||||||
|
@ -42,7 +41,6 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
||||||
git checkout dev
|
git checkout dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
- <h4>STEP-1:</h4> Switch to `dev` branch from GitHub UI and click the `Develop on Okteto` button below to deploy litmus-portal on Okteto cloud and start developing.
|
- <h4>STEP-1:</h4> Switch to `dev` branch from GitHub UI and click the `Develop on Okteto` button below to deploy litmus-portal on Okteto cloud and start developing.
|
||||||
|
@ -66,28 +64,31 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
||||||
- <h4>STEP-4:</h4> Start the selected component's service on its container to start developing and get the changes reflected on deployed litmus-portal component which can be accessed from Okteto UI or from `https://<service name>-<okteto-namespace>.cloud.okteto.net`. This may take several minutes to start running inside the docker container. Add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. Then enter username as `admin` and password as `litmus` to login from the UI.
|
- <h4>STEP-4:</h4> Start the selected component's service on its container to start developing and get the changes reflected on deployed litmus-portal component which can be accessed from Okteto UI or from `https://<service name>-<okteto-namespace>.cloud.okteto.net`. This may take several minutes to start running inside the docker container. Add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. Then enter username as `admin` and password as `litmus` to login from the UI.
|
||||||
|
|
||||||
> `<okteto-namespace>`:litmusportal-frontend app>
|
> `<okteto-namespace>`:litmusportal-frontend app>
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install && npm audit fix && cd src && npm start
|
npm install && npm audit fix && cd src && npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
> Use your IDE or code editor to add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. <h5>Must be done before login.</h5>
|
> Use your IDE or code editor to add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. <h5>Must be done before login.</h5>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
if (loc.href.includes('cloud.okteto.net')) {
|
if (loc.href.includes("cloud.okteto.net")) {
|
||||||
authURL =
|
authURL =
|
||||||
'https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/auth';
|
"https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/auth";
|
||||||
apiURL =
|
apiURL =
|
||||||
'https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/api';
|
"https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/api";
|
||||||
sockURL = `wss://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/ws`;
|
sockURL = `wss://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/ws`;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
> login as default user with username as `admin` and password as `litmus` from the browser via `https://litmusportal-frontend-service-<okteto-namespace>.cloud.okteto.net` replacing `<okteto-namespace>` with your GitHub username.
|
> login as default user with username as `admin` and password as `litmus` from the browser via `https://litmusportal-frontend-service-<okteto-namespace>.cloud.okteto.net` replacing `<okteto-namespace>` with your GitHub username.
|
||||||
|
|
||||||
- <h4>STEP-5:</h4> Schedule a chaos workflow from frontend selecting `namespaced-scope-chaos` from predefined workflow templates. Also replace the `adminModeNamespace` parameter's value field `litmus` with your GitHub username using the Yaml editor while scheduling. Now, you can start developing.
|
- <h4>STEP-5:</h4> Schedule a chaos workflow by constructing one using `pod-delete` experiment from ChaosHub. Also replace the `adminModeNamespace` parameter's value field `litmus` with your GitHub username using the Yaml editor while scheduling. The `namespace:` field from workflow's metadata must be deleted using the yaml editor, `appns: '<GitHub-username>'` and `applabel: 'app=hello-world'` should be provided to the Chaos Engine in the constructed workflow. Now, you can start developing.
|
||||||
|
|
||||||
- <h4>STEP-6:</h4> After you are done with the code changes, you may stop the development environment using `okteto down` and go to the `litmus-portal/frontend/src/config` directory of the cloned repository on `dev` branch from IDE or code editor and delete the `if block` which was added for okteto dev env setup from `index.ts` file. Then change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
- <h4>STEP-6:</h4> After you are done with the code changes, you may stop the development environment using `okteto down` and go to the `litmus-portal/frontend/src/config` directory of the cloned repository on `dev` branch from IDE or code editor and delete the `if block` which was added for okteto dev env setup from `index.ts` file. Then change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
||||||
|
|
||||||
> Exit the process and the container. Stop it using the given commands in sequence.
|
> Exit the process and the container. Stop it using the given commands in sequence.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
exit && exit
|
exit && exit
|
||||||
okteto down
|
okteto down
|
||||||
|
@ -96,6 +97,7 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
||||||
> Go to `litmus-portal/frontend/src/config` directory of the clone from your IDE or code editor and delete the added `if block` for okteto env setup from `index.ts` file.
|
> Go to `litmus-portal/frontend/src/config` directory of the clone from your IDE or code editor and delete the added `if block` for okteto env setup from `index.ts` file.
|
||||||
|
|
||||||
> Change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
> Change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ../..
|
cd ../..
|
||||||
git add .
|
git add .
|
||||||
|
@ -105,7 +107,6 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
||||||
|
|
||||||
- <h4>STEP-7:</h4> Raise a pull request from the `dev` branch in your fork to https://github.com/litmuschaos/litmus using GitHub UI after pushing all the changes.
|
- <h4>STEP-7:</h4> Raise a pull request from the `dev` branch in your fork to https://github.com/litmuschaos/litmus using GitHub UI after pushing all the changes.
|
||||||
|
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
|
|
||||||
- Delete all configmaps after cleaning up your Okteto cloud namespace or deleting Litmus Portal components.
|
- Delete all configmaps after cleaning up your Okteto cloud namespace or deleting Litmus Portal components.
|
||||||
|
@ -128,7 +129,6 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
||||||
|
|
||||||
- If `No cluster is registered with the selected projectID` message is displayed, select a project from header's project list dropdown.
|
- If `No cluster is registered with the selected projectID` message is displayed, select a project from header's project list dropdown.
|
||||||
|
|
||||||
|
|
||||||
## Optional
|
## Optional
|
||||||
|
|
||||||
- To compare the changes made during development phase with the actual production code you can visit `https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net` after replacing `<okteto-namespace>` with your GitHub username.
|
- To compare the changes made during development phase with the actual production code you can visit `https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net` after replacing `<okteto-namespace>` with your GitHub username.
|
||||||
|
|
|
@ -46,7 +46,7 @@ spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
port: 9091
|
port: 9091
|
||||||
targetPort: 80
|
targetPort: 8080
|
||||||
selector:
|
selector:
|
||||||
component: litmusportal-frontend
|
component: litmusportal-frontend
|
||||||
---
|
---
|
||||||
|
@ -127,10 +127,6 @@ spec:
|
||||||
key: JWTSecret
|
key: JWTSecret
|
||||||
- name: LITMUS_PORTAL_NAMESPACE
|
- name: LITMUS_PORTAL_NAMESPACE
|
||||||
value: ${OKTETO_NAMESPACE}
|
value: ${OKTETO_NAMESPACE}
|
||||||
- name: PORTAL_SCOPE
|
|
||||||
value: "namespace"
|
|
||||||
- name: PORTAL_ENDPOINT
|
|
||||||
value: "http://litmusportal-server-service:9002"
|
|
||||||
- name: SELF_CLUSTER
|
- name: SELF_CLUSTER
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: AGENT_SCOPE
|
- name: AGENT_SCOPE
|
||||||
|
@ -153,8 +149,14 @@ spec:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: litmus-portal-admin-config
|
name: litmus-portal-admin-config
|
||||||
key: DB_PASSWORD
|
key: DB_PASSWORD
|
||||||
|
- name: PORTAL_SCOPE
|
||||||
|
value: "namespace"
|
||||||
|
- name: PORTAL_ENDPOINT
|
||||||
|
value: "http://litmusportal-server-service:9002"
|
||||||
- name: SUBSCRIBER_IMAGE
|
- name: SUBSCRIBER_IMAGE
|
||||||
value: "litmuschaos/litmusportal-subscriber:ci"
|
value: "litmuschaos/litmusportal-subscriber:ci"
|
||||||
|
- name: EVENT_TRACKER_IMAGE
|
||||||
|
value: "litmuschaos/litmusportal-event-tracker:ci"
|
||||||
- name: ARGO_SERVER_IMAGE
|
- name: ARGO_SERVER_IMAGE
|
||||||
value: "argoproj/argocli:v2.9.3"
|
value: "argoproj/argocli:v2.9.3"
|
||||||
- name: ARGO_WORKFLOW_CONTROLLER_IMAGE
|
- name: ARGO_WORKFLOW_CONTROLLER_IMAGE
|
||||||
|
@ -162,11 +164,13 @@ spec:
|
||||||
- name: ARGO_WORKFLOW_EXECUTOR_IMAGE
|
- name: ARGO_WORKFLOW_EXECUTOR_IMAGE
|
||||||
value: "argoproj/argoexec:v2.9.3"
|
value: "argoproj/argoexec:v2.9.3"
|
||||||
- name: LITMUS_CHAOS_OPERATOR_IMAGE
|
- name: LITMUS_CHAOS_OPERATOR_IMAGE
|
||||||
value: "litmuschaos/chaos-operator:1.13.0"
|
value: "litmuschaos/chaos-operator:1.13.3"
|
||||||
- name: LITMUS_CHAOS_RUNNER_IMAGE
|
- name: LITMUS_CHAOS_RUNNER_IMAGE
|
||||||
value: "litmuschaos/chaos-runner:1.13.0"
|
value: "litmuschaos/chaos-runner:1.13.3"
|
||||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||||
value: "litmuschaos/chaos-exporter:1.13.0"
|
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||||
|
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||||
|
value: "pns"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
@ -324,6 +328,6 @@ spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
port: 9091
|
port: 9091
|
||||||
targetPort: 80
|
targetPort: 8080
|
||||||
selector:
|
selector:
|
||||||
component: litmusportal-production-frontend
|
component: litmusportal-production-frontend
|
||||||
|
|
|
@ -10,11 +10,14 @@ export AGENT_NAMESPACE=litmus
|
||||||
export LITMUS_PORTAL_NAMESPACE=litmus
|
export LITMUS_PORTAL_NAMESPACE=litmus
|
||||||
export PORTAL_SCOPE=namespace
|
export PORTAL_SCOPE=namespace
|
||||||
export SUBSCRIBER_IMAGE=litmuschaos/litmusportal-subscriber:ci
|
export SUBSCRIBER_IMAGE=litmuschaos/litmusportal-subscriber:ci
|
||||||
|
export EVENT_TRACKER_IMAGE=litmuschaos/litmusportal-event-tracker:ci
|
||||||
|
export CONTAINER_RUNTIME_EXECUTOR=k8sapi
|
||||||
export ARGO_SERVER_IMAGE=argoproj/argocli:v2.9.3
|
export ARGO_SERVER_IMAGE=argoproj/argocli:v2.9.3
|
||||||
export ARGO_WORKFLOW_CONTROLLER_IMAGE=argoproj/workflow-controller:v2.9.3
|
export ARGO_WORKFLOW_CONTROLLER_IMAGE=argoproj/workflow-controller:v2.9.3
|
||||||
export ARGO_WORKFLOW_EXECUTOR_IMAGE=argoproj/argoexec:v2.9.3
|
export ARGO_WORKFLOW_EXECUTOR_IMAGE=argoproj/argoexec:v2.9.3
|
||||||
export LITMUS_CHAOS_OPERATOR_IMAGE=litmuschaos/chaos-operator:1.13.0
|
export LITMUS_CHAOS_OPERATOR_IMAGE=litmuschaos/chaos-operator:1.13.3
|
||||||
export LITMUS_CHAOS_RUNNER_IMAGE=litmuschaos/chaos-runner:1.13.0
|
export LITMUS_CHAOS_RUNNER_IMAGE=litmuschaos/chaos-runner:1.13.3
|
||||||
|
export LITMUS_CHAOS_EXPORTER_IMAGE=litmuschaos/chaos-exporter:1.13.3
|
||||||
export ADMIN_USERNAME=admin
|
export ADMIN_USERNAME=admin
|
||||||
export ADMIN_PASSWORD=litmus
|
export ADMIN_PASSWORD=litmus
|
||||||
export DB_USER=admin
|
export DB_USER=admin
|
||||||
|
|
|
@ -17,7 +17,7 @@ This directory contains chaos interleaved grafana dashboards along with the util
|
||||||
- Install the litmus chaos operator and CRDs
|
- Install the litmus chaos operator and CRDs
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.0.yaml
|
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.3.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
||||||
|
@ -29,7 +29,7 @@ This directory contains chaos interleaved grafana dashboards along with the util
|
||||||
- Install the chaos experiments in admin(litmus) namespace
|
- Install the chaos experiments in admin(litmus) namespace
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.0?file=charts/generic/experiments.yaml -n litmus
|
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.3?file=charts/generic/experiments.yaml -n litmus
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setup the Monitoring Infrastructure
|
## Setup the Monitoring Infrastructure
|
||||||
|
|
|
@ -32,7 +32,7 @@ Run chaos experiments and workflows on sock-shop application with grafana dashbo
|
||||||
- Install the litmus chaos operator and CRDs
|
- Install the litmus chaos operator and CRDs
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.0.yaml
|
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.3.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
||||||
|
@ -44,7 +44,7 @@ Run chaos experiments and workflows on sock-shop application with grafana dashbo
|
||||||
- Install the chaos experiments in admin(litmus) namespace
|
- Install the chaos experiments in admin(litmus) namespace
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.0?file=charts/generic/experiments.yaml -n litmus
|
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.3?file=charts/generic/experiments.yaml -n litmus
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step-3: Configure Sock-shop application and Litmus for the Kublr centralized monitoring Infrastructure
|
### Step-3: Configure Sock-shop application and Litmus for the Kublr centralized monitoring Infrastructure
|
||||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
||||||
app: chaos-exporter
|
app: chaos-exporter
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: litmuschaos/chaos-exporter:1.13.0
|
- image: litmuschaos/chaos-exporter:1.13.3
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: chaos-exporter
|
name: chaos-exporter
|
||||||
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
||||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
||||||
app: chaos-exporter
|
app: chaos-exporter
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: litmuschaos/chaos-exporter:1.13.0
|
- image: litmuschaos/chaos-exporter:1.13.3
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: chaos-exporter
|
name: chaos-exporter
|
||||||
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
||||||
|
|
Loading…
Reference in New Issue