Kubernetes-client: Support for DnsConfig

Created on 10 Dec 2018  路  8Comments  路  Source: fabric8io/kubernetes-client

Hi,
I would like to add the possibility to config as bellow (under Spec)

dnsPolicy: "None"
dnsConfig:
nameservers:
- 10.0.0.0
searches:
- someurl.com
options:
- name: rotate

I could not find a way to do this, Is it supported? (I am using version v3.1.13)
I know there is a way to set the DnsPolicy but could not find how to set the DnsConfig.
final Deployment deployment = new DeploymentBuilder()
.withNewSpec()//spec
.withReplicas(replicas)
.withStrategy(new DeploymentStrategy(strategy)
.withSelector(new LabelSelector(null, labels))
.withNewTemplate()//spec.template
.withNewSpec()//spec.template.spec
.withDnsPolicy(dnsPolicy)
.endSpec()
.endTemplate()
.endSpec()
.build();

All 8 comments

@Dafnafrank : We recently upgraded to Kubernetes v1.12.0, this feature should be available in the next release(which is coming in a few days) ;-) . You can verify using SNAPSHOT in the meantime.

@rohanKanojia
Hi, Any update to when this release is planned?
Will this client work with kubernetes v1.11?

@Dafnafrank : I'm planning to release this weekend. We upgraded model to 1.12.12 so it should work with 1.11: https://github.com/fabric8io/kubernetes-client/blob/96d5516587679e458e41450a61a3b680c1347733/kubernetes-model/Gopkg.lock#L165-L170

What you're asking doesn't seem related to the issue.

@Dafnafrank : it might be because of mismatching api versions. Check whether the object you're posting has deprecated apiVersion extensions/v1beta1

Thanks for the answer!
I moved my question to a different issue (https://github.com/fabric8io/kubernetes-client/issues/1291)

@Dafnafrank : kubernetes-client 4.1,.1 has been released. Could you please recheck and close this issue?

Closing this, please reopen if not working as expected

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uce picture uce  路  15Comments

chenchun picture chenchun  路  28Comments

rhuss picture rhuss  路  15Comments

iocanel picture iocanel  路  21Comments

WywTed picture WywTed  路  22Comments