Skip to content

Add deprecation comments to CRD fields that are deprecated in the underlying APIs #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Changes from all 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
21 changes: 15 additions & 6 deletions api/v1/coherence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func (in *PersistenceSpec) AddVolumeMounts(c *corev1.Container) {
}

// Add the snapshot volume mount if required
if in != nil && in.Snapshots != nil && (in.Snapshots.Volume != nil || in.Snapshots.PersistentVolumeClaim != nil) {
if in.Snapshots != nil && (in.Snapshots.Volume != nil || in.Snapshots.PersistentVolumeClaim != nil) {
// Set the snapshot location environment variable
c.Env = append(c.Env, corev1.EnvVar{Name: EnvVarCohSnapshotDir, Value: VolumeMountPathSnapshots})
// Add the snapshot volume mount
Expand Down Expand Up @@ -1276,7 +1276,7 @@ func (in *NamedPortSpec) GetServicePort(d CoherenceResource) int32 {
switch {
case in == nil:
return 0
case in != nil && in.Service != nil && in.Service.Port != nil:
case in.Service != nil && in.Service.Port != nil:
return *in.Service.Port
case in.Port == 0 && strings.ToLower(in.Name) == PortNameMetrics:
// special case for well known port - metrics
Expand Down Expand Up @@ -1380,15 +1380,23 @@ type ServiceMonitorSpec struct {
// +optional
TLSConfig *monitoringv1.TLSConfig `json:"tlsConfig,omitempty"`
// File to read bearer token for scraping targets.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint
// Deprecated: use `authorization` instead.
// +optional
BearerTokenFile string `json:"bearerTokenFile,omitempty"`
// Secret to mount to read bearer token for scraping targets. The secret
// needs to be in the same namespace as the service monitor and accessible by
// the Prometheus Operator.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint
// Deprecated: use `authorization` instead.
// +optional
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
// `authorization` configures the Authorization header credentials to use when
// scraping the target.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint
//
// Cannot be set at the same time as `basicAuth`, or `oauth2`.
//
// +optional
Authorization *monitoringv1.SafeAuthorization `json:"authorization,omitempty"`
// HonorLabels chooses the metric labels on collisions with target labels.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint
// +optional
Expand Down Expand Up @@ -1511,11 +1519,11 @@ func (in *JvmDebugSpec) CreateEnvVars() []corev1.EnvVar {
corev1.EnvVar{Name: EnvVarJvmDebugPort, Value: p},
)

if in != nil && in.Suspend != nil && *in.Suspend {
if in.Suspend != nil && *in.Suspend {
envVars = append(envVars, corev1.EnvVar{Name: EnvVarJvmDebugSuspended, Value: "true"})
}

if in != nil && in.Attach != nil {
if in.Attach != nil {
envVars = append(envVars, corev1.EnvVar{Name: EnvVarJvmDebugAttach, Value: *in.Attach})
}

Expand Down Expand Up @@ -1944,6 +1952,7 @@ type ServiceSpec struct {
// +optional
ClusterIPs []string `json:"clusterIPs,omitempty"`
// LoadBalancerIP is the IP address of the load balancer
// Deprecated: This field is deprecated in the Kubernetes API.
// +optional
LoadBalancerIP *string `json:"loadBalancerIP,omitempty"`
// The extra labels to add to the service.
Expand Down
Loading