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.
110 lines
3.3 KiB
Protocol Buffer
110 lines
3.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "github.com/hanzoai/cd/pkg/apiclient/settings";
|
|
|
|
// Settings Service
|
|
//
|
|
// Settings Service API retrieves Hanzo CD settings
|
|
package cluster;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "github.com/hanzoai/cd/pkg/apis/application/v1alpha1/generated.proto";
|
|
import "github.com/hanzoai/cd/server/settings/oidc/claims.proto";
|
|
|
|
// SettingsQuery is a query for Hanzo CD settings
|
|
message SettingsQuery {
|
|
}
|
|
|
|
message Settings {
|
|
string url = 1 [(gogoproto.customname) = "URL"];
|
|
DexConfig dexConfig = 2;
|
|
OIDCConfig oidcConfig = 3 [(gogoproto.customname) = "OIDCConfig"];
|
|
string appLabelKey = 4;
|
|
map<string, github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ResourceOverride> resourceOverrides = 5;
|
|
bool statusBadgeEnabled = 6;
|
|
GoogleAnalyticsConfig googleAnalytics = 7;
|
|
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.KustomizeOptions kustomizeOptions = 8;
|
|
// Help settings
|
|
Help help = 9;
|
|
repeated Plugin plugins = 10;
|
|
bool userLoginsDisabled = 11;
|
|
// Deprecated: use sidecar plugins instead.
|
|
repeated github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ConfigManagementPlugin configManagementPlugins = 12;
|
|
repeated string kustomizeVersions = 13;
|
|
string uiCssURL = 14;
|
|
string uiBannerContent = 15;
|
|
string uiBannerURL = 16;
|
|
string passwordPattern = 17;
|
|
string trackingMethod = 18;
|
|
bool uiBannerPermanent = 19;
|
|
string uiBannerPosition = 20;
|
|
string statusBadgeRootUrl = 21;
|
|
bool execEnabled = 22;
|
|
string controllerNamespace = 23;
|
|
bool appsInAnyNamespaceEnabled = 24;
|
|
bool impersonationEnabled = 25;
|
|
string installationID = 26;
|
|
repeated string additionalUrls = 27 [(gogoproto.customname) = "AdditionalURLs"];
|
|
bool hydratorEnabled = 28;
|
|
bool syncWithReplaceAllowed = 29;
|
|
string uiLoginButtonText = 30;
|
|
}
|
|
|
|
message GoogleAnalyticsConfig {
|
|
string trackingID = 1;
|
|
bool anonymizeUsers = 2;
|
|
}
|
|
|
|
message SettingsPluginsResponse {
|
|
repeated Plugin plugins = 1;
|
|
}
|
|
|
|
// Help settings
|
|
message Help {
|
|
// the URL for getting chat help, this will typically be your Slack channel for support
|
|
string chatUrl = 1;
|
|
// the text for getting chat help, defaults to "Chat now!"
|
|
string chatText = 2;
|
|
// the URLs for downloading cd binaries
|
|
map<string, string> binaryUrls = 3;
|
|
}
|
|
|
|
// Plugin settings
|
|
message Plugin {
|
|
// the name of the plugin, e.g. "kasane"
|
|
string name = 1;
|
|
}
|
|
|
|
message DexConfig {
|
|
repeated Connector connectors = 1;
|
|
}
|
|
|
|
message Connector {
|
|
string name = 1;
|
|
string type = 2;
|
|
}
|
|
|
|
message OIDCConfig {
|
|
string name = 1;
|
|
string issuer = 2;
|
|
string clientID = 3 [(gogoproto.customname) = "ClientID"];
|
|
string cliClientID = 4 [(gogoproto.customname) = "CLIClientID"];
|
|
repeated string scopes = 5;
|
|
map<string, github.com.hanzoai.cd.server.settings.oidc.Claim> idTokenClaims = 6 [(gogoproto.customname) = "IDTokenClaims"];
|
|
bool enablePKCEAuthentication = 7;
|
|
}
|
|
|
|
// SettingsService
|
|
service SettingsService {
|
|
|
|
// Get returns Hanzo CD settings
|
|
rpc Get(SettingsQuery) returns (Settings) {
|
|
option (google.api.http).get = "/v1/settings";
|
|
}
|
|
|
|
// Get returns Hanzo CD plugins
|
|
rpc GetPlugins(SettingsQuery) returns (SettingsPluginsResponse) {
|
|
option (google.api.http).get = "/v1/settings/plugins";
|
|
}
|
|
}
|