Kubernetes-plugin: Contradiction in containerTemplate inheritance
up vote
0
down vote
favorite
https://github.com/jenkinsci/kubernetes-plugin/blame/master/README.md#L214-L226
I'm not understanding the inheritance behavior. In the container templates section, it mentions that it inherits the parent template with the same name. But going down the readme, it mentions that overriding a previously created (I'm assuming that it is the parent?) container template image with the same name is possible.
Am I missing something?
jenkins kubernetes jenkins-plugins
add a comment |
up vote
0
down vote
favorite
https://github.com/jenkinsci/kubernetes-plugin/blame/master/README.md#L214-L226
I'm not understanding the inheritance behavior. In the container templates section, it mentions that it inherits the parent template with the same name. But going down the readme, it mentions that overriding a previously created (I'm assuming that it is the parent?) container template image with the same name is possible.
Am I missing something?
jenkins kubernetes jenkins-plugins
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
https://github.com/jenkinsci/kubernetes-plugin/blame/master/README.md#L214-L226
I'm not understanding the inheritance behavior. In the container templates section, it mentions that it inherits the parent template with the same name. But going down the readme, it mentions that overriding a previously created (I'm assuming that it is the parent?) container template image with the same name is possible.
Am I missing something?
jenkins kubernetes jenkins-plugins
https://github.com/jenkinsci/kubernetes-plugin/blame/master/README.md#L214-L226
I'm not understanding the inheritance behavior. In the container templates section, it mentions that it inherits the parent template with the same name. But going down the readme, it mentions that overriding a previously created (I'm assuming that it is the parent?) container template image with the same name is possible.
Am I missing something?
jenkins kubernetes jenkins-plugins
jenkins kubernetes jenkins-plugins
edited Nov 9 at 0:46
Rico
24.4k94864
24.4k94864
asked Nov 8 at 23:26
GinaDoug
82
82
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Sounds like 2 different things.
One is the inheritance from a parent of the same name. If no values for image, etc are specified then it will inherit from the parent.
The other is overriding an image name from a parent where it's inheriting from. So if the parent has
image: mycontainer1
and the inheriting template hasimage: mycontainer2
, thenmycontainer2
will be used. If you are using exactly the same image with the same tag then the point of overring is moot.
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Sounds like 2 different things.
One is the inheritance from a parent of the same name. If no values for image, etc are specified then it will inherit from the parent.
The other is overriding an image name from a parent where it's inheriting from. So if the parent has
image: mycontainer1
and the inheriting template hasimage: mycontainer2
, thenmycontainer2
will be used. If you are using exactly the same image with the same tag then the point of overring is moot.
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
add a comment |
up vote
0
down vote
accepted
Sounds like 2 different things.
One is the inheritance from a parent of the same name. If no values for image, etc are specified then it will inherit from the parent.
The other is overriding an image name from a parent where it's inheriting from. So if the parent has
image: mycontainer1
and the inheriting template hasimage: mycontainer2
, thenmycontainer2
will be used. If you are using exactly the same image with the same tag then the point of overring is moot.
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Sounds like 2 different things.
One is the inheritance from a parent of the same name. If no values for image, etc are specified then it will inherit from the parent.
The other is overriding an image name from a parent where it's inheriting from. So if the parent has
image: mycontainer1
and the inheriting template hasimage: mycontainer2
, thenmycontainer2
will be used. If you are using exactly the same image with the same tag then the point of overring is moot.
Sounds like 2 different things.
One is the inheritance from a parent of the same name. If no values for image, etc are specified then it will inherit from the parent.
The other is overriding an image name from a parent where it's inheriting from. So if the parent has
image: mycontainer1
and the inheriting template hasimage: mycontainer2
, thenmycontainer2
will be used. If you are using exactly the same image with the same tag then the point of overring is moot.
answered Nov 9 at 0:54
Rico
24.4k94864
24.4k94864
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
add a comment |
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
sorry as I'm new to this, so does that mean that a (child?) template will only inherit from the parent if there is not (etc image) value? And that if there is a value in the child, it would just override it?
– GinaDoug
Nov 9 at 3:15
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
It could inherit other values that are not 'image' if you are not overriding those for example.
– Rico
Nov 9 at 3:23
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
Got it. Thanks for the explanation, and this info confirms that our system is not working as expected. Our team is using the deprecated containerTemplate format and the values are not being overridden, do you happen to know if the deprecation might have caused the overriding behavior to be lost?
– GinaDoug
Nov 9 at 17:00
1
1
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
After testing different ways of building, I am happy to report that it wasn't containerTemplate that was causing the overriding behavior to be lost, but the way our team is handling passing the variable to the podTemplate. Thanks again Rico! Your explanation cleared up some things for me.
– GinaDoug
Nov 9 at 18:37
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53217675%2fkubernetes-plugin-contradiction-in-containertemplate-inheritance%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown