Skip to content
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

Reflect currently running version from status.version in additionalPrinterColumns #3549

Merged
merged 2 commits into from
Aug 24, 2020
Merged
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
10 changes: 5 additions & 5 deletions config/crds/all-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: APM version
name: version
type: string
Expand Down Expand Up @@ -494,7 +494,7 @@ spec:
description: Beat type
name: type
type: string
- JSONPath: .spec.version
- JSONPath: .status.version
description: Beat version
name: version
type: string
Expand Down Expand Up @@ -705,7 +705,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Elasticsearch version
name: version
type: string
Expand Down Expand Up @@ -1780,7 +1780,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Enterprise Search version
name: version
type: string
Expand Down Expand Up @@ -2197,7 +2197,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Kibana version
name: version
type: string
Expand Down
49 changes: 32 additions & 17 deletions config/crds/bases/apm.k8s.elastic.co_apmservers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ metadata:
creationTimestamp: null
name: apmservers.apm.k8s.elastic.co
spec:
additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: APM version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
group: apm.k8s.elastic.co
names:
categories:
Expand All @@ -38,7 +23,22 @@ spec:
status: {}
version: v1
versions:
- name: v1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .status.version
description: APM version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1
schema:
openAPIV3Schema:
description: ApmServer represents an APM Server resource in a Kubernetes cluster.
Expand Down Expand Up @@ -6351,7 +6351,22 @@ spec:
type: object
served: true
storage: true
- name: v1beta1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: APM version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: ApmServer represents an APM Server resource in a Kubernetes cluster.
Expand Down
2 changes: 1 addition & 1 deletion config/crds/bases/beat.k8s.elastic.co_beats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
description: Beat type
name: type
type: string
- JSONPath: .spec.version
- JSONPath: .status.version
description: Beat version
name: version
type: string
Expand Down
58 changes: 38 additions & 20 deletions config/crds/bases/elasticsearch.k8s.elastic.co_elasticsearches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ metadata:
creationTimestamp: null
name: elasticsearches.elasticsearch.k8s.elastic.co
spec:
additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: Elasticsearch version
name: version
type: string
- JSONPath: .status.phase
name: phase
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
group: elasticsearch.k8s.elastic.co
names:
categories:
Expand All @@ -41,7 +23,25 @@ spec:
status: {}
version: v1
versions:
- name: v1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .status.version
description: Elasticsearch version
name: version
type: string
- JSONPath: .status.phase
name: phase
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1
schema:
openAPIV3Schema:
description: Elasticsearch represents an Elasticsearch resource in a Kubernetes
Expand Down Expand Up @@ -7385,7 +7385,25 @@ spec:
type: object
served: true
storage: true
- name: v1beta1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: Elasticsearch version
name: version
type: string
- JSONPath: .status.phase
name: phase
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: Elasticsearch represents an Elasticsearch resource in a Kubernetes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Enterprise Search version
name: version
type: string
Expand Down
49 changes: 32 additions & 17 deletions config/crds/bases/kibana.k8s.elastic.co_kibanas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ metadata:
creationTimestamp: null
name: kibanas.kibana.k8s.elastic.co
spec:
additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: Kibana version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
group: kibana.k8s.elastic.co
names:
categories:
Expand All @@ -38,7 +23,22 @@ spec:
status: {}
version: v1
versions:
- name: v1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .status.version
description: Kibana version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1
schema:
openAPIV3Schema:
description: Kibana represents a Kibana resource in a Kubernetes cluster.
Expand Down Expand Up @@ -6321,7 +6321,22 @@ spec:
type: object
served: true
storage: true
- name: v1beta1
- additionalPrinterColumns:
- JSONPath: .status.health
name: health
type: string
- JSONPath: .status.availableNodes
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
description: Kibana version
name: version
type: string
- JSONPath: .metadata.creationTimestamp
name: age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: Kibana represents a Kibana resource in a Kubernetes cluster.
Expand Down
7 changes: 7 additions & 0 deletions config/crds/patches/apm-kibana-patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
path: /spec/validation
- op: remove
path: /spec/versions/1/schema
# Move additionalPrinterColumns of the v1 version to the top-level, and remove it from the v1beta1 version.
# This is in order to be compatible with k8s 1.11.
- op: move
from: /spec/versions/0/additionalPrinterColumns
path: /spec/additionalPrinterColumns
- op: remove
path: /spec/versions/1/additionalPrinterColumns
# Remove validation.openAPIV3Schema.type that causes failures on k8s 1.11.
# This should have been fixed with https://github.com/kubernetes-sigs/controller-tools/pull/72, but it looks like
# this commit has been lost in history. See https://github.com/kubernetes-sigs/controller-tools/issues/296.
Expand Down
7 changes: 7 additions & 0 deletions config/crds/patches/elasticsearch-patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
path: /spec/validation
- op: remove
path: /spec/versions/1/schema
# Move additionalPrinterColumns of the v1 version to the top-level, and remove it from the v1beta1 version.
# This is in order to be compatible with k8s 1.11.
- op: move
from: /spec/versions/0/additionalPrinterColumns
path: /spec/additionalPrinterColumns
- op: remove
path: /spec/versions/1/additionalPrinterColumns
# Remove validation.openAPIV3Schema.type that causes failures on k8s 1.11.
# This should have been fixed with https://github.com/kubernetes-sigs/controller-tools/pull/72, but it looks like
# this commit has been lost in history. See https://github.com/kubernetes-sigs/controller-tools/issues/296.
Expand Down
10 changes: 5 additions & 5 deletions hack/manifest-gen/assets/charts/eck/crds/all-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: APM version
name: version
type: string
Expand Down Expand Up @@ -494,7 +494,7 @@ spec:
description: Beat type
name: type
type: string
- JSONPath: .spec.version
- JSONPath: .status.version
description: Beat version
name: version
type: string
Expand Down Expand Up @@ -705,7 +705,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Elasticsearch version
name: version
type: string
Expand Down Expand Up @@ -1780,7 +1780,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Enterprise Search version
name: version
type: string
Expand Down Expand Up @@ -2197,7 +2197,7 @@ spec:
description: Available nodes
name: nodes
type: integer
- JSONPath: .spec.version
- JSONPath: .status.version
description: Kibana version
name: version
type: string
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apm/v1/apmserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type ApmServerStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="health",type="string",JSONPath=".status.health"
// +kubebuilder:printcolumn:name="nodes",type="integer",JSONPath=".status.availableNodes",description="Available nodes"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version",description="APM version"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".status.version",description="APM version"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:storageversion
type ApmServer struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/beat/v1beta1/beat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const (
// +kubebuilder:printcolumn:name="available",type="integer",JSONPath=".status.availableNodes",description="Available nodes"
// +kubebuilder:printcolumn:name="expected",type="integer",JSONPath=".status.expectedNodes",description="Expected nodes"
// +kubebuilder:printcolumn:name="type",type="string",JSONPath=".spec.type",description="Beat type"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version",description="Beat version"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".status.version",description="Beat version"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:storageversion
type Beat struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/elasticsearch/v1/elasticsearch_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (es ElasticsearchStatus) IsDegraded(prev ElasticsearchStatus) bool {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="health",type="string",JSONPath=".status.health"
// +kubebuilder:printcolumn:name="nodes",type="integer",JSONPath=".status.availableNodes",description="Available nodes"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version",description="Elasticsearch version"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".status.version",description="Elasticsearch version"
// +kubebuilder:printcolumn:name="phase",type="string",JSONPath=".status.phase"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:storageversion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var _ commonv1.Association = &EnterpriseSearch{}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="health",type="string",JSONPath=".status.health"
// +kubebuilder:printcolumn:name="nodes",type="integer",JSONPath=".status.availableNodes",description="Available nodes"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version",description="Enterprise Search version"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".status.version",description="Enterprise Search version"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:storageversion
type EnterpriseSearch struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kibana/v1/kibana_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var _ commonv1.Association = &Kibana{}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="health",type="string",JSONPath=".status.health"
// +kubebuilder:printcolumn:name="nodes",type="integer",JSONPath=".status.availableNodes",description="Available nodes"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version",description="Kibana version"
// +kubebuilder:printcolumn:name="version",type="string",JSONPath=".status.version",description="Kibana version"
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:storageversion
type Kibana struct {
Expand Down