osca.dev fields (#82)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -142,23 +142,32 @@
|
||||
{
|
||||
"schemaIDs": [
|
||||
"#/properties/podDisruptionBudgetEnabled",
|
||||
"#/properties/spreadAcrossNodes"
|
||||
"#/properties/spreadAcrossNodes",
|
||||
"#/properties/podAnnotations"
|
||||
],
|
||||
"uiSchema": {},
|
||||
"metaData": {
|
||||
"name": "High Availability",
|
||||
"name": "Deployment fine-tuning",
|
||||
"icon": "M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schemaIDs": [
|
||||
"#/properties/podAnnotations",
|
||||
"#/properties/name",
|
||||
"#/properties/description",
|
||||
"#/properties/ownerName",
|
||||
"#/properties/ownerIm",
|
||||
"#/properties/gitSha",
|
||||
"#/properties/gitRepository"
|
||||
"#/properties/gitRepository",
|
||||
"#/properties/documentation",
|
||||
"#/properties/logs",
|
||||
"#/properties/metrics",
|
||||
"#/properties/traces",
|
||||
"#/properties/issues"
|
||||
],
|
||||
"uiSchema": {},
|
||||
"metaData": {
|
||||
"name": "Misc",
|
||||
"name": "Service Catalog",
|
||||
"icon": "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,44 @@ metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
{{- if or .Values.gitRepository .Values.gitSha }}
|
||||
{{- if or (or (or (or (or .Values.gitRepository .Values.gitSha) .Values.serviceName) .Values.serviceDescription) .Values.ownerName) .Values.ownerIm }}
|
||||
annotations:
|
||||
{{- if .Values.gitRepository }}
|
||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||
{{- $parts := split "/" .Values.gitRepository }}
|
||||
opensca.dev/v0.1.0/vcs/owner: {{ $parts._0 }}
|
||||
opensca.dev/v0.1.0/vcs/name: {{ $parts._1 }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitSha }}
|
||||
gimlet.io/git-sha: {{ .Values.gitSha }}
|
||||
opensca.dev/v0.1.0/version/sha: {{ .Values.gitSha }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceName }}
|
||||
opensca.dev/v0.1.0/name: {{ .Values.serviceName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceDescription }}
|
||||
opensca.dev/v0.1.0/description: {{ .Values.serviceDescription | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ownerName }}
|
||||
opensca.dev/v0.1.0/owner/name: {{ .Values.ownerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ownerIm }}
|
||||
opensca.dev/v0.1.0/owner/im: {{ .Values.ownerIm | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.documentation }}
|
||||
opensca.dev/v0.1.0/documentation: {{ .Values.documentation | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.logs }}
|
||||
opensca.dev/v0.1.0/logs: {{ .Values.logs | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics }}
|
||||
opensca.dev/v0.1.0/metrics: {{ .Values.metrics | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.issues }}
|
||||
opensca.dev/v0.1.0/issues: {{ .Values.issues | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces }}
|
||||
opensca.dev/v0.1.0/traces: {{ .Values.traces | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
|
||||
@@ -4,11 +4,32 @@ templates:
|
||||
tests:
|
||||
- it: Should set Gimlet taxonomy
|
||||
set:
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitRepository: laszlocph/demo-app
|
||||
gitSha: xyz
|
||||
serviceName: cart-backend
|
||||
serviceDescription: "Backend to manage shopping cart state, written in Go"
|
||||
ownerName: "backend-team"
|
||||
ownerIm: "#backend-team"
|
||||
documentation: https://confluence.mycompany.com/cart-backend
|
||||
logs: https://grafana.mycompany.com/logs
|
||||
metrics: https://grafana.mycompany.com/cart-dashboard
|
||||
issues: https://jira.mycompany.com/cart-backend
|
||||
traces: https://jaeger.mycompany.com/cart-dashboard
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
gimlet.io/git-repository: github.com/laszlocph/demo-app
|
||||
gimlet.io/git-repository: laszlocph/demo-app
|
||||
gimlet.io/git-sha: xyz
|
||||
opensca.dev/v0.1.0/vcs/owner: laszlocph
|
||||
opensca.dev/v0.1.0/vcs/name: demo-app
|
||||
opensca.dev/v0.1.0/version/sha: xyz
|
||||
opensca.dev/v0.1.0/name: cart-backend
|
||||
opensca.dev/v0.1.0/description: "Backend to manage shopping cart state, written in Go"
|
||||
opensca.dev/v0.1.0/owner/name: "backend-team"
|
||||
opensca.dev/v0.1.0/owner/im: "#backend-team"
|
||||
opensca.dev/v0.1.0/documentation: https://confluence.mycompany.com/cart-backend
|
||||
opensca.dev/v0.1.0/logs: https://grafana.mycompany.com/logs
|
||||
opensca.dev/v0.1.0/metrics: https://grafana.mycompany.com/cart-dashboard
|
||||
opensca.dev/v0.1.0/issues: https://jira.mycompany.com/cart-backend
|
||||
opensca.dev/v0.1.0/traces: https://jaeger.mycompany.com/cart-dashboard
|
||||
|
||||
@@ -189,6 +189,69 @@
|
||||
"required": [],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"name": {
|
||||
"$id": "#/properties/name",
|
||||
"type": "string",
|
||||
"title": "Service Name",
|
||||
"description": "The service name for unique identification",
|
||||
"default": ""
|
||||
},
|
||||
"description": {
|
||||
"$id": "#/properties/description",
|
||||
"type": "string",
|
||||
"title": "Service Description",
|
||||
"description": "Human readable text description of the service",
|
||||
"default": ""
|
||||
},
|
||||
"ownerName": {
|
||||
"$id": "#/properties/ownerName",
|
||||
"type": "string",
|
||||
"title": "Owner",
|
||||
"description": "The person or team who is responsible for this service",
|
||||
"default": ""
|
||||
},
|
||||
"ownerIm": {
|
||||
"$id": "#/properties/ownerIm",
|
||||
"type": "string",
|
||||
"title": "Owner IM",
|
||||
"description": "Instant messaging channel, or direct message handle of the owner. prefix with # for channels, prefix with @ for direct messages.",
|
||||
"default": ""
|
||||
},
|
||||
"documentation": {
|
||||
"$id": "#/properties/documentation",
|
||||
"type": "string",
|
||||
"title": "Link to Documentation",
|
||||
"description": "Link to documentation. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"logs": {
|
||||
"$id": "#/properties/logs",
|
||||
"type": "string",
|
||||
"title": "Link to Logs",
|
||||
"description": "Link to log aggregation platform. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"metrics": {
|
||||
"$id": "#/properties/metrics",
|
||||
"type": "string",
|
||||
"title": "Link to Metrics",
|
||||
"description": "Link to metrics dashboard. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"issues": {
|
||||
"$id": "#/properties/issues",
|
||||
"type": "string",
|
||||
"title": "Link to Issues",
|
||||
"description": "Link to issue tracker. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"traces": {
|
||||
"$id": "#/properties/traces",
|
||||
"type": "string",
|
||||
"title": "Link to Traces",
|
||||
"description": "Link to application traces. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"gitSha": {
|
||||
"$id": "#/properties/gitSha",
|
||||
"type": "string",
|
||||
|
||||
@@ -2,7 +2,7 @@ ingress:
|
||||
host: chart-example.local
|
||||
ingressClassName: nginx
|
||||
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitRepository: laszlocph/demo-app
|
||||
gitSha: xyz
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user