mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
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.
51 lines
1.9 KiB
Protocol Buffer
51 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "github.com/hanzoai/cd/pkg/apiclient/certificate";
|
|
|
|
// Certificate Service
|
|
//
|
|
// Certificate Service API performs CRUD actions against repository certificate
|
|
// resources.
|
|
package certificate;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "github.com/hanzoai/cd/pkg/apis/application/v1alpha1/generated.proto";
|
|
|
|
// Message to query the server for configured repository certificates
|
|
message RepositoryCertificateQuery {
|
|
// A file-glob pattern (not regular expression) the host name has to match
|
|
string hostNamePattern = 1;
|
|
// The type of the certificate to match (ssh or https)
|
|
string certType = 2;
|
|
// The sub type of the certificate to match (protocol dependent, usually only used for ssh certs)
|
|
string certSubType = 3;
|
|
}
|
|
|
|
// Request to create a set of certificates
|
|
message RepositoryCertificateCreateRequest {
|
|
// List of certificates to be created
|
|
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepositoryCertificateList certificates = 1;
|
|
// Whether to upsert already existing certificates
|
|
bool upsert = 2;
|
|
}
|
|
|
|
message RepositoryCertificateResponse {}
|
|
|
|
service CertificateService {
|
|
// List all available repository certificates
|
|
rpc ListCertificates(RepositoryCertificateQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
|
option (google.api.http).get = "/v1/certificates";
|
|
}
|
|
|
|
// Creates repository certificates on the server
|
|
rpc CreateCertificate(RepositoryCertificateCreateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
|
option (google.api.http) = {
|
|
post: "/v1/certificates"
|
|
body: "certificates"
|
|
};
|
|
}
|
|
|
|
// Delete the certificates that match the RepositoryCertificateQuery
|
|
rpc DeleteCertificate(RepositoryCertificateQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
|
option (google.api.http).delete = "/v1/certificates";
|
|
}
|
|
} |