Skip to content

Commit

Permalink
chore: add values schema json and address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Feb 13, 2024
1 parent e2d714d commit 7f2c21c
Show file tree
Hide file tree
Showing 3 changed files with 285 additions and 20 deletions.
3 changes: 0 additions & 3 deletions agent-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ spec:
name: {{ .Values.db.jwtSecretKeyRef.name }}
key: {{ .Values.db.jwtSecretKeyRef.key }}
envFrom:
- secretRef:
name: {{ .Values.smtp.secretRef.name }}
optional: true
- secretRef:
name: {{ .Values.upstream.secretName }}
command:
Expand Down
283 changes: 283 additions & 0 deletions agent-chart/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["image", "serviceAccount", "upstream", "resources", "db", "canary-checker", "config-db"],
"properties": {
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"pullPolicy": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": ["repository", "pullPolicy", "tag"]
},
"serviceAccount": {
"type": "object",
"properties": {
"annotations": {
"type": "object"
}
},
"required": ["annotations"]
},
"upstream": {
"type": "object",
"properties": {
"createSecret": {
"type": "boolean"
},
"host": {
"type": "string"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"agentName": {
"type": "string"
},
"secretName": {
"type": "string"
}
},
"required": ["createSecret", "host", "username", "password", "agentName", "secretName"]
},
"resources": {
"type": "object",
"properties": {
"requests": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"required": ["cpu", "memory"]
},
"limits": {
"type": "object",
"properties": {
"memory": {
"type": "string"
},
"cpu": {
"type": "string"
}
},
"required": ["memory", "cpu"]
}
}
},
"db": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"conf": {
"type": "object"
},
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
},
"jwtSecretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
},
"storageClass": {
"type": "string"
},
"storage": {
"type": "string"
},
"shmVolume": {
"type": "string"
},
"resources": {
"type": "object",
"properties": {
"requests": {
"type": "object",
"properties": {
"memory": {
"type": "string"
}
},
"required": ["memory"]
}
}
}
}
},
"canary-checker": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"required": ["type"]
},
"upstream": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}
},
"required": ["enabled", "secretKeyRef"]
},
"db": {
"type": "object",
"properties": {
"runMigrations": {
"type": "boolean"
},
"external": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"create": {
"type": "boolean"
},
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
}
},
"required": ["enabled", "create", "secretKeyRef"]
}
}
},
"flanksource-ui": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": ["enabled"]
}
}
},
"config-db": {
"type": "object",
"properties": {
"disablePostgrest": {
"type": "boolean"
},
"db": {
"type": "object",
"properties": {
"runMigrations": {
"type": "boolean"
},
"embedded": {
"type": "object",
"properties": {
"persist": {
"type": "boolean"
}
},
"required": ["persist"]
},
"external": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
}
},
"required": ["enabled", "secretKeyRef"]
}
}
},
"upstream": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
},
"pageSize": {
"type": "integer"
}
},
"required": ["enabled", "secretKeyRef", "pageSize"]
}
}
}
}
}

19 changes: 2 additions & 17 deletions agent-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,10 @@ image:
pullPolicy: IfNotPresent
tag: "v0.0.439"

global:
otel:
collector: ""

serviceAccount:
# Annotations to add to the service account
annotations: {}

otel:
# OpenTelemetry gRPC collector endpoint in host:port format
collector: "{{.Values.global.otel.collector}}"
serviceName: "mission-control"

smtp:
secretRef:
name: incident-commander-smtp

# If true, creates secret
upstream:
createSecret: true
Expand Down Expand Up @@ -80,14 +67,13 @@ db:
shmVolume: 256Mi
resources:
requests:
memory: 4Gi
memory: 2Gi

canary-checker:
image:
type: full
upstream:
enabled: true
agentName: "default-agent"
secretKeyRef:
name: upstream
db:
Expand Down Expand Up @@ -117,5 +103,4 @@ config-db:
enabled: true
secretKeyRef:
name: upstream
agentName: default-agent
pageSize: 500
pageSize: 100

0 comments on commit 7f2c21c

Please sign in to comment.