This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new c742331  fix(pdb): Add TypeMeta field to PodDisruptionBudget resource
c742331 is described below

commit c742331e8a358c098a1e22aeb94055a8bdb9783a
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Wed Feb 17 11:48:25 2021 +0100

    fix(pdb): Add TypeMeta field to PodDisruptionBudget resource
    
    TypeMeta may be required in some situations, like for logic
    that work with unstructured representation of resources.
---
 pkg/trait/pdb.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/trait/pdb.go b/pkg/trait/pdb.go
index de1131f..6569c93 100644
--- a/pkg/trait/pdb.go
+++ b/pkg/trait/pdb.go
@@ -85,6 +85,10 @@ func (t *pdbTrait) Apply(e *Environment) error {
 
 func (t *pdbTrait) podDisruptionBudgetFor(integration *v1.Integration) 
*v1beta1.PodDisruptionBudget {
        pdb := &v1beta1.PodDisruptionBudget{
+               TypeMeta: metav1.TypeMeta{
+                       Kind: "PodDisruptionBudget",
+                       APIVersion: v1beta1.SchemeGroupVersion.String(),
+               },
                ObjectMeta: metav1.ObjectMeta{
                        Name:      integration.Name,
                        Namespace: integration.Namespace,

Reply via email to