Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions opensearch-operator/api/v1/opensearch_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ type DashboardsConfig struct {
*ImageSpec `json:",inline,omitempty"`
Enable bool `json:"enable,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
Replicas int32 `json:"replicas"`
Tls *DashboardsTlsConfig `json:"tls,omitempty"`
Version string `json:"version"`
//+kubebuilder:default=1
Replicas int32 `json:"replicas,omitempty"`
Tls *DashboardsTlsConfig `json:"tls,omitempty"`
Version string `json:"version,omitempty"`
// Base Path for Opensearch Clusters running behind a reverse proxy
BasePath string `json:"basePath,omitempty"`
// Additional properties for opensearch_dashboards.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3039,6 +3039,7 @@ spec:
type: object
type: object
replicas:
default: 1
format: int32
type: integer
resources:
Expand Down Expand Up @@ -3396,9 +3397,6 @@ spec:
type: array
version:
type: string
required:
- replicas
- version
type: object
general:
description: |-
Expand Down
7 changes: 6 additions & 1 deletion opensearch-operator/pkg/helpers/reconcile-helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@ func ResolveDashboardsImage(cr *opsterv1.OpenSearchCluster) (result opsterv1.Ima
defaultRepo = *cr.Spec.General.DefaultRepo
}

version := cr.Spec.Dashboards.Version
if version == "" {
version = cr.Spec.General.Version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a problem in scenarios where we only release OpenSearch. Example for 3.3.1 opensearch-project/opensearch-build#5784. The docker for OpenSearch has 3.3.1 https://hub.docker.com/r/opensearchproject/opensearch/tags, but not for OpenSearch Dashboards https://hub.docker.com/r/opensearchproject/opensearch-dashboards/tags.
CC @getsaurabh02 @peterzhuamazon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on this its good to disable the version (for OSD) only when enabled is false.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch - @josedev-union can you propose a solution?

}

result.Image = ptr.To(fmt.Sprintf("%s:%s",
path.Join(defaultRepo, defaultImage), cr.Spec.Dashboards.Version))
path.Join(defaultRepo, defaultImage), version))
return
}

Expand Down
Loading