Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
8 changes: 7 additions & 1 deletion api/v1alpha1/freight_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ type GitCommit struct {
Author string `json:"author,omitempty" protobuf:"bytes,7,opt,name=author"`
// Committer is the person who committed the commit.
Committer string `json:"committer,omitempty" protobuf:"bytes,8,opt,name=committer"`
// SubscriptionName is the name of the subscription that
// discovered this commit. This field is only populated if the subscription
Comment thread
krancour marked this conversation as resolved.
Outdated
//
// +optional
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,9,opt,name=subscriptionName"`
}

// DeepEquals returns a bool indicating whether the receiver deep-equals the
Expand All @@ -87,7 +92,8 @@ func (g *GitCommit) DeepEquals(other *GitCommit) bool {
g.Tag == other.Tag &&
g.Message == other.Message &&
g.Author == other.Author &&
g.Committer == other.Committer
g.Committer == other.Committer &&
g.SubscriptionName == other.SubscriptionName
}

// Equals returns a bool indicating whether two GitCommits are equivalent.
Expand Down
1,011 changes: 647 additions & 364 deletions api/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions api/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions api/v1alpha1/stage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ type Image struct {
Digest string `json:"digest,omitempty" protobuf:"bytes,4,opt,name=digest"`
// Annotations is a map of arbitrary metadata for the image.
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,5,rep,name=annotations" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// SubscriptionName is the name of the subscription that discovered this
// image. This field is only populated if the subscription was assigned
// a name.
//
// +optional
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,6,opt,name=subscriptionName"`
}

// DeepEquals returns a bool indicating whether the receiver deep-equals the
Expand All @@ -629,7 +635,8 @@ func (i *Image) DeepEquals(other *Image) bool {
return i.RepoURL == other.RepoURL &&
i.Tag == other.Tag &&
i.Digest == other.Digest &&
maps.Equal(i.Annotations, other.Annotations)
maps.Equal(i.Annotations, other.Annotations) &&
i.SubscriptionName == other.SubscriptionName
}

// Chart describes a specific version of a Helm chart.
Expand All @@ -645,6 +652,12 @@ type Chart struct {
Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"`
// Version specifies a particular version of the chart.
Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"`
// SubscriptionName is the name of the subscription that discovered this
// chart. This field is only populated if the subscription was assigned
// a name.
//
// +optional
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,4,opt,name=subscriptionName"`
}

// DeepEquals returns a bool indicating whether the receiver deep-equals the
Expand All @@ -658,7 +671,8 @@ func (c *Chart) DeepEquals(other *Chart) bool {
}
return c.RepoURL == other.RepoURL &&
c.Name == other.Name &&
c.Version == other.Version
c.Version == other.Version &&
c.SubscriptionName == other.SubscriptionName
}

// Health describes the health of a Stage.
Expand Down
24 changes: 24 additions & 0 deletions api/v1alpha1/warehouse_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ type FreightCreationCriteria struct {
// RepoSubscription describes a subscription to ONE OF a Git repository, a
// container image repository, a Helm chart repository, or something else.
type RepoSubscription struct {
// Name is an optional, human-readable identifier for this subscription. When
// a Warehouse has multiple subscriptions of the same type (e.g., two image
// repositories), assigning a name to each makes them distinguishable in logs,
// the Kargo UI freight timeline, and other contexts where subscriptions would
// otherwise be ambiguous.
Comment thread
krancour marked this conversation as resolved.
Outdated
//
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=253
Name string `json:"name,omitempty" protobuf:"bytes,5,opt,name=name"`
// Git describes a subscriptions to a Git repository.
Git *GitSubscription `json:"git,omitempty" protobuf:"bytes,1,opt,name=git"`
// Image describes a subscription to container image repository.
Expand Down Expand Up @@ -408,6 +417,11 @@ type GitDiscoveryResult struct {
//
// +optional
Commits []DiscoveredCommit `json:"commits" protobuf:"bytes,2,rep,name=commits"`
// SubscriptionName is the optional human-readable name of the subscription
// that produced this discovery result.
//
// +optional
Comment thread
krancour marked this conversation as resolved.
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,3,opt,name=subscriptionName"`
}

// DiscoveredCommit represents a commit discovered by a Warehouse for a
Expand Down Expand Up @@ -455,6 +469,11 @@ type ImageDiscoveryResult struct {
//
// +optional
References []DiscoveredImageReference `json:"references" protobuf:"bytes,3,rep,name=references"`
// SubscriptionName is the optional human-readable name of the subscription
// that produced this discovery result.
//
// +optional
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,4,opt,name=subscriptionName"`
}

// DiscoveredImageReference represents an image reference discovered by a
Expand Down Expand Up @@ -502,6 +521,11 @@ type ChartDiscoveryResult struct {
//
// +optional
Versions []string `json:"versions" protobuf:"bytes,4,rep,name=versions"`
// SubscriptionName is the optional human-readable name of the subscription
// that produced this discovery result.
//
// +optional
SubscriptionName string `json:"subscriptionName,omitempty" protobuf:"bytes,5,opt,name=subscriptionName"`
}

// DiscoveryResult represents the result of an artifact discovery operation for
Expand Down
15 changes: 15 additions & 0 deletions charts/kargo/resources/crds/kargo.akuity.io_freights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ spec:
registry, the URL implicitly points to a specific chart and the Name field
will be empty.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this chart.
type: string
version:
description: Version specifies a particular version of the chart.
type: string
Expand Down Expand Up @@ -140,6 +145,11 @@ spec:
repoURL:
description: RepoURL is the URL of a Git repository.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this commit.
type: string
tag:
description: |-
Tag denotes a tag in the repository that matched selection criteria and
Expand Down Expand Up @@ -168,6 +178,11 @@ spec:
description: RepoURL describes the repository in which the image
can be found.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this image.
type: string
tag:
description: |-
Tag identifies a specific version of the image in the repository specified
Expand Down
30 changes: 30 additions & 0 deletions charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ spec:
registry, the URL implicitly points to a specific chart and the Name field
will be empty.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this chart.
type: string
version:
description: Version specifies a particular version of the
chart.
Expand Down Expand Up @@ -364,6 +369,11 @@ spec:
repoURL:
description: RepoURL is the URL of a Git repository.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this commit.
type: string
tag:
description: |-
Tag denotes a tag in the repository that matched selection criteria and
Expand Down Expand Up @@ -393,6 +403,11 @@ spec:
description: RepoURL describes the repository in which the
image can be found.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this image.
type: string
tag:
description: |-
Tag identifies a specific version of the image in the repository specified
Expand Down Expand Up @@ -502,6 +517,11 @@ spec:
registry, the URL implicitly points to a specific chart and the Name field
will be empty.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this chart.
type: string
version:
description: Version specifies a particular version
of the chart.
Expand Down Expand Up @@ -538,6 +558,11 @@ spec:
repoURL:
description: RepoURL is the URL of a Git repository.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this commit.
type: string
tag:
description: |-
Tag denotes a tag in the repository that matched selection criteria and
Expand Down Expand Up @@ -567,6 +592,11 @@ spec:
description: RepoURL describes the repository in which
the image can be found.
type: string
subscriptionName:
description: |-
SubscriptionName is the optional human-readable name of the subscription
that discovered this image.
type: string
tag:
description: |-
Tag identifies a specific version of the image in the repository specified
Expand Down
Loading
Loading