Skip to content

Commit

Permalink
feat(info): add new info properties in cluster and environment info
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianGottinger committed Nov 28, 2023
1 parent 14dd981 commit 94a9922
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions pkg/recipes/copsctl/cluster_info_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ package copsctl
type ClusterInfoV1 struct {
Version string `json:"version"`
Description string `json:"description"`
Identifier string `json:"identifier"`
OidcIssuerUrl string `json:"oidc_issuer_url"`
}
29 changes: 16 additions & 13 deletions pkg/recipes/copsctl/environment_info_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ import (

// EnvironmentInfoV2 object is a wrapper over the info environment response in version 2.
type EnvironmentInfoV2 struct {
Version string `json:"version"`
Description string `json:"description"`
SubscriptionId string `json:"subscription_id"`
TenantId string `json:"tenant_id"`
EgressStaticOutboundIpsEnabled bool `json:"egress_static_outbound_ips_enabled"`
EgressStaticOutboundIps []string `json:"egress_static_outbound_ips"`
TechnicalAccountName string `json:"technical_account_name"`
TechnicalAccountNamespace string `json:"technical_account_namespace"`
CoreOpsMonitoringAndLogging string `json:"coreops_monitoring_and_logging"`
LogAnalyticsWorkspace string `json:"log_analytics_workspace"`
NetworkingBlue Networking `json:"networking_blue"`
NetworkingGreen Networking `json:"networking_green"`
ApplicationDnsZones []ApplicationDnsZone `json:"application_dns_zones"`
Version string `json:"version"`
Description string `json:"description"`
SubscriptionId string `json:"subscription_id"`
TenantId string `json:"tenant_id"`
EgressStaticOutboundIpsEnabled bool `json:"egress_static_outbound_ips_enabled"`
EgressStaticOutboundIps []string `json:"egress_static_outbound_ips"`
TechnicalAccountName string `json:"technical_account_name"`
TechnicalAccountNamespace string `json:"technical_account_namespace"`
CoreOpsMonitoringAndLogging string `json:"coreops_monitoring_and_logging"`
SecondaryCoreOpsMonitoringAndLogging string `json:"secondary_coreops_monitoring_and_logging"`
LogAnalyticsWorkspace string `json:"log_analytics_workspace"`
NetworkingBlue Networking `json:"networking_blue"`
NetworkingGreen Networking `json:"networking_green"`
ApplicationDnsZones []ApplicationDnsZone `json:"application_dns_zones"`
BaseDomain string `json:"base_domain"`
SecondaryBaseDomain string `json:"secondary_base_domain"`
}

type Networking struct {
Expand Down
3 changes: 3 additions & 0 deletions pkg/recipes/copsctl/environment_info_v2_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
}
],
"coreops_monitoring_and_logging": "monitoring.local",
"secondary_coreops_monitoring_and_logging": "sec.monitoring.local",
"egress_static_outbound_ips": [
"1.2.3.4",
"4.3.2.1"
Expand Down Expand Up @@ -92,5 +93,7 @@
"technical_account_name": "my-technical-account",
"technical_account_namespace": "my-technical-account-namespace",
"tenant_id": "00000000-0000-0000-0000-000000000001",
"base_domain": "lulu.com",
"secondary_base_domain": "sec.lulu.com",
"version": "2"
}

0 comments on commit 94a9922

Please sign in to comment.