Files
zeekay 187be9e719 proto, settings: fix stale argoproj.argo_cd.v3 package path and hanzocd part-of drift
repository.proto and 11 sibling hand-written .proto files referenced
generated.proto's application/v1alpha1 types under the pre-fork package
path (github.com.argoproj.argo_cd.v3...); protoc silently kept compiling
because generated.proto still carried that same stale package too. Point
both at the real, mechanically-derived path
(github.com.hanzoai.cd.pkg.apis.application.v1alpha1, no v3 segment) and
regenerate everything protoc/go-to-protobuf own: generated.proto/pb.go,
every pkg/apiclient and reposerver/cmpserver/commitserver *.pb.go,
assets/swagger.json, and the CRD manifests.

That regeneration surfaced a second, unrelated bug: hack/gen-crd-spec
stamped app.kubernetes.io/part-of: cd on the CRDs, but
util/settings.isSettingsObject (and the ConfigMap informer built on it)
only ever recognizes part-of=hanzocd. The same wrong "cd" value was
baked into cmd/cd/commands/admin/settings.go's setSettingsMeta and the
shared test/testdata.go fixtures ~30 files import — util/settings' own
test suite was panicking on an empty slice because its fixture was
invisible to the informer it was supposedly seeding. Fixed the label
everywhere it's produced or asserted in the settings path; left the
~90 unrelated part-of:"cd" literals in other packages' local test
fixtures alone since they never touch this selector.

Also dropped 25 "TODO: Remove deprecated <dead upstream issue link>"
comments that duplicated the real explanation already sitting one line
away (a proper `Deprecated:` godoc, a cobra Deprecated field, or a
nolint:staticcheck marker) — kept the explanation, dropped the link, per
the standing rule for these citations.

And repointed the two Grafana dashboards' job selector from
argocd-server-metrics, a Service the manifests never create, to
hanzocd-server-metrics, the one they do.
2026-09-05 14:58:20 -07:00

61 lines
2.2 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/hanzoai/cd/pkg/apiclient/gpgkey";
// GPG public key service
//
// GPG public key API performs CRUD actions against GnuPGPublicKey resources
package gpgkey;
import "google/api/annotations.proto";
import "github.com/hanzoai/cd/pkg/apis/application/v1alpha1/generated.proto";
// Message to query the server for configured GPG public keys
message GnuPGPublicKeyQuery {
// The GPG key ID to query for
string keyID = 1;
}
// Request to create one or more public keys on the server
message GnuPGPublicKeyCreateRequest {
// Raw key data of the GPG key(s) to create
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.GnuPGPublicKey publickey = 1;
// Whether to upsert already existing public keys
bool upsert = 2;
}
// Response to a public key creation request
message GnuPGPublicKeyCreateResponse {
// List of GPG public keys that have been created
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.GnuPGPublicKeyList created = 1;
// List of key IDs that haven been skipped because they already exist on the server
repeated string skipped = 2;
}
// Generic (empty) response for GPG public key CRUD requests
message GnuPGPublicKeyResponse {}
// GPGKeyService implements API for managing GPG public keys on the server
service GPGKeyService {
// List all available repository certificates
rpc List(GnuPGPublicKeyQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.GnuPGPublicKeyList) {
option (google.api.http).get = "/v1/gpgkeys";
}
// Get information about specified GPG public key from the server
rpc Get(GnuPGPublicKeyQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.GnuPGPublicKey) {
option (google.api.http).get = "/v1/gpgkeys/{keyID}";
}
// Create one or more GPG public keys in the server's configuration
rpc Create(GnuPGPublicKeyCreateRequest) returns (GnuPGPublicKeyCreateResponse) {
option (google.api.http) = {
post: "/v1/gpgkeys"
body: "publickey"
};
}
// Delete specified GPG public key from the server's configuration
rpc Delete(GnuPGPublicKeyQuery) returns (GnuPGPublicKeyResponse) {
option (google.api.http).delete = "/v1/gpgkeys";
}
}