Skip to content

Commit 8c38a49

Browse files
Merge pull request #360 from ingvagabund/get-machine-additional-columns-from-annotations-and-labels
Get values for CRD's additionalPrinterColumns from annotations and labels instead of machine provider config
2 parents 253eb9a + 4542417 commit 8c38a49

File tree

5 files changed

+34
-11
lines changed

5 files changed

+34
-11
lines changed

Gopkg.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ required = [
1313
"sigs.k8s.io/controller-tools/cmd/controller-gen", # for crd/rbac generation
1414
]
1515

16+
[[override]]
17+
name = "github.com/openshift/cluster-api"
18+
branch = "openshift-4.2-cluster-api-0.1.0"
19+
1620
[[override]]
1721
name = "k8s.io/utils"
1822

install/0000_30_machine-api-operator_02_machine.crd.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,36 @@ metadata:
77
name: machines.machine.openshift.io
88
spec:
99
additionalPrinterColumns:
10-
- JSONPath: .status.providerStatus.instanceId
11-
description: Instance ID of machine created in AWS
12-
name: Instance
13-
type: string
14-
- JSONPath: .status.providerStatus.instanceState
15-
description: State of the AWS instance
10+
- JSONPath: .metadata.annotations['machine\.openshift\.io/instance-state']
11+
description: State of instance
1612
name: State
1713
type: string
18-
- JSONPath: .spec.providerSpec.value.instanceType
14+
- JSONPath: .metadata.labels['machine\.openshift\.io/instance-type']
1915
description: Type of instance
2016
name: Type
2117
type: string
22-
- JSONPath: .spec.providerSpec.value.placement.region
18+
- JSONPath: .metadata.labels['machine\.openshift\.io/region']
2319
description: Region associated with machine
2420
name: Region
2521
type: string
26-
- JSONPath: .spec.providerSpec.value.placement.availabilityZone
22+
- JSONPath: .metadata.labels['machine\.openshift\.io/zone']
2723
description: Zone associated with machine
2824
name: Zone
2925
type: string
3026
- JSONPath: .metadata.creationTimestamp
3127
description: Machine age
3228
name: Age
3329
type: date
30+
- JSONPath: .status.nodeRef.name
31+
description: Node associated with machine
32+
name: Node
33+
priority: 1
34+
type: string
35+
- JSONPath: .spec.providerID
36+
description: Provider ID of machine created in cloud provider
37+
name: ProviderID
38+
priority: 1
39+
type: string
3440
group: machine.openshift.io
3541
names:
3642
kind: Machine

vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machine_types.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineset_types.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)