Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JSON schema for keptn, include Flux plugin in build, fix plugin count #1184

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ gen-grpc-resources:
# Generate plugins YAML index files for both all plugins and end-user ones.
gen-plugins-index: build-plugins
go run ./hack/gen-plugin-index.go -output-path ./plugins-dev-index.yaml
go run ./hack/gen-plugin-index.go -output-path ./plugins-index.yaml -plugin-name-filter 'kubectl|helm|kubernetes|prometheus|exec|doctor|keptn|github-events'
go run ./hack/gen-plugin-index.go -output-path ./plugins-index.yaml -plugin-name-filter 'kubectl|helm|kubernetes|prometheus|exec|doctor|keptn|github-events|flux'

gen-docs-cli:
rm -f ./cmd/cli/docs/*
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func migrate(ctx context.Context, status *printer.StatusPrinter, opts Options, b
}

pluginsCount := 0
if len(plugins) != 0 || len(plugins[0].Groups) != 0 {
if len(plugins) != 0 && len(plugins[0].Groups) != 0 {
pluginsCount = len(plugins[0].Groups)
}
status.Step("Converted %d plugins", pluginsCount)
Expand Down
16 changes: 10 additions & 6 deletions internal/source/keptn/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,25 @@ func jsonSchema() api.JSONSchema {
"type": "object",
"properties": {
"url": {
"description": "Keptn API endpoint",
"description": "Keptn API Gateway URL",
"type": "string",
"default": "http://localhost:8080/api"
"default": "http://api-gateway-nginx.keptn.svc.cluster.local/api",
"title": "Endpoint URL"
},
"token": {
"description": "Keptn API Token",
"type": "string"
"type": "string",
"title": "Token"
},
"project": {
"description": "Keptn Project",
"type": "string"
"type": "string",
"title": "Project"
},
"service": {
"description": "Keptn Service",
"type": "string"
"description": "Keptn Service name under the project",
"type": "string",
"title": "Service"
}
},
"required": [
Expand Down
Loading