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

Clean up Required/Optional API Fields #2778

Merged
merged 1 commit into from
Feb 11, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
branch:
description: Name of the branch containig the packages. Finalized
packages will be committed to this branch (if the repository
allows write access).
allows write access). If unspecified, defaults to "main".
type: string
directory:
description: Directory within the Git repository where the packages
Expand All @@ -85,10 +85,10 @@ spec:
be located in the same namespace as the resource containing
the reference.
type: string
required:
- name
type: object
required:
- branch
- directory
- repo
type: object
mutators:
Expand Down Expand Up @@ -139,6 +139,8 @@ spec:
be located in the same namespace as the resource containing
the reference.
type: string
required:
- name
type: object
required:
- registry
Expand All @@ -161,7 +163,7 @@ spec:
branch:
description: Name of the branch containig the packages. Finalized
packages will be committed to this branch (if the repository
allows write access).
allows write access). If unspecified, defaults to "main".
type: string
directory:
description: Directory within the Git repository where the
Expand All @@ -181,10 +183,10 @@ spec:
to be located in the same namespace as the resource
containing the reference.
type: string
required:
- name
type: object
required:
- branch
- directory
- repo
type: object
oci:
Expand All @@ -203,6 +205,8 @@ spec:
to be located in the same namespace as the resource
containing the reference.
type: string
required:
- name
type: object
required:
- registry
Expand Down
8 changes: 4 additions & 4 deletions porch/controllers/pkg/apis/porch/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ type GitRepository struct {
// Address of the Git repository, for example:
// `https://github.com/GoogleCloudPlatform/blueprints.git`
Repo string `json:"repo"`
// Name of the branch containig the packages. Finalized packages will be committed to this branch (if the repository allows write access).
Branch string `json:"branch"`
// Name of the branch containig the packages. Finalized packages will be committed to this branch (if the repository allows write access). If unspecified, defaults to "main".
Branch string `json:"branch,omitempty"`
// Directory within the Git repository where the packages are stored. A subdirectory of this directory containing a Kptfile is considered a package. If unspecified, defaults to root directory.
Directory string `json:"directory"`
Directory string `json:"directory,omitempty"`
// Reference to secret containing authentication credentials.
SecretRef SecretRef `json:"secretRef,omitempty"`
}
Expand Down Expand Up @@ -124,7 +124,7 @@ type RepositoryRef struct {

type SecretRef struct {
// Name of the secret. The secret is expected to be located in the same namespace as the resource containing the reference.
Name string `json:"name,omitempty"`
Name string `json:"name"`
}

type FunctionEval struct {
Expand Down