Open
Description
It would be nice to have exceptionless version of get
(and maybe for put
/patch
etc?):
def cluster_id
client.api('v1')
.resource('configmaps', namespace: 'kube-public')
.get('cluster-info')
.metadata
.uid
rescue K8s::Error::NotFound
nil
end
vs:
def cluster_id
client.api('v1')
.resource('configmaps', namespace: 'kube-public')
.get!('cluster-info')&.metadata&.uid
end