Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ tmp/
.hugo*
resources/
public/

# Build directory
.build/
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ install-golangci-lint:

.PHONY: install-swagger
install-swagger:
go install github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0
go install github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1

.PHONY: install-mdtogo
install-mdtogo:
Expand All @@ -76,7 +76,7 @@ fix:
fmt:
go fmt ./...

schema:
schema: install-swagger
GOBIN=$(GOBIN) scripts/generate-schema.sh

generate: install-mdtogo
Expand Down
4 changes: 2 additions & 2 deletions commands/pkg/get/cmdget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestCmd_execute(t *testing.T) {
},
UpdateStrategy: kptfilev1.ResourceMerge,
},
UpstreamLock: &kptfilev1.UpstreamLock{
UpstreamLock: &kptfilev1.Locator{
Type: kptfilev1.GitOrigin,
Git: &kptfilev1.GitLock{
Directory: "/",
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestCmdMainBranch_execute(t *testing.T) {
},
UpdateStrategy: kptfilev1.ResourceMerge,
},
UpstreamLock: &kptfilev1.UpstreamLock{
UpstreamLock: &kptfilev1.Locator{
Type: kptfilev1.GitOrigin,
Git: &kptfilev1.GitLock{
Directory: "/",
Expand Down
2 changes: 1 addition & 1 deletion commands/pkg/update/cmdupdate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestCmd_execute(t *testing.T) {
},
UpdateStrategy: kptfilev1.FastForward,
},
UpstreamLock: &kptfilev1.UpstreamLock{
UpstreamLock: &kptfilev1.Locator{
Type: kptfilev1.GitOrigin,
Git: &kptfilev1.GitLock{
Repo: "file://" + g.RepoDirectory,
Expand Down
58 changes: 44 additions & 14 deletions documentation/content/en/reference/schema/kptfile/kptfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,33 @@
"$ref": "#/definitions/Selector"
},
"x-go-name": "Selectors"
},
"tag": {
"description": "`Tag` is an optional field for specifying/overriding the tag of the function image.\nCan be a semver constraint satisfying this spec: https://github.com/Masterminds/semver?tab=readme-ov-file#checking-version-constraints",
"type": "string",
"x-go-name": "Tag"
}
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
},
"GenericLock": {
"type": "object",
"title": "GenericLock is a minimal locator for a package stored in a generic storage backend.",
"properties": {
"resourceID": {
"description": "ResourceID is a unique identifier of the resource.\nThe format depends on the underlying storage.",
"type": "string",
"x-go-name": "ResourceID"
},
"resourceVersion": {
"description": "ResourceVersion indicates the last fetched version of the resource.\nThe format depends on the underlying storage.",
"type": "string",
"x-go-name": "ResourceVersion"
},
"storeID": {
"description": "StoreID is a descriptor of the underlying storage type.\ne.g. 'DB' for database",
"type": "string",
"x-go-name": "StoreID"
}
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
Expand Down Expand Up @@ -173,6 +200,22 @@
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
},
"Locator": {
"type": "object",
"title": "Locator is a resolved locator for the last fetch of the package.",
"properties": {
"generic": {
"$ref": "#/definitions/GenericLock"
},
"git": {
"$ref": "#/definitions/GitLock"
},
"type": {
"$ref": "#/definitions/OriginType"
}
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
},
"NameMeta": {
"type": "object",
"title": "NameMeta contains name information.",
Expand Down Expand Up @@ -454,19 +497,6 @@
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
},
"UpstreamLock": {
"type": "object",
"title": "UpstreamLock is a resolved locator for the last fetch of the package.",
"properties": {
"git": {
"$ref": "#/definitions/GitLock"
},
"type": {
"$ref": "#/definitions/OriginType"
}
},
"x-go-package": "github.com/kptdev/kpt/pkg/api/kptfile/v1"
},
"kptfile": {
"type": "object",
"title": "KptFile contains information about a package managed with kpt.",
Expand Down Expand Up @@ -523,7 +553,7 @@
"$ref": "#/definitions/Upstream"
},
"upstreamLock": {
"$ref": "#/definitions/UpstreamLock"
"$ref": "#/definitions/Locator"
}
},
"x-go-name": "KptFile",
Expand Down
Loading
Loading