Skip to content

Commit

Permalink
fix(pdb): Add TypeMeta field to PodDisruptionBudget resource
Browse files Browse the repository at this point in the history
TypeMeta may be required in some situations, like for logic
that work with unstructured representation of resources.
  • Loading branch information
astefanutti committed Feb 17, 2021
1 parent 532ae04 commit c742331
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/trait/pdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c742331

Please sign in to comment.