Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates on skupper install and deploy workload roles #28

Merged
merged 8 commits into from
Feb 5, 2025
Merged

Conversation

rafaelvzago
Copy link
Owner

Description

Bumping version to 0.1.10
feat(skupper): Implement namespace and cluster scope installation
fix(deploy_workload): Ensure all replicas are running before proceeding
Changing the hello world example to adapt to the changes made on the
following roles:

Motivation and Context

This commit refactors the Skupper installation role to support both namespace
and cluster-scoped deployments. This provides greater flexibility for users
and aligns with best practices for Kubernetes deployments.

  • Defaulting to the 'skupper-operator' namespace.
  • Dynamically generating the Skupper Helm chart using a Makefile.
  • Adding conditional logic to handle namespace and cluster scope
    installations.
  • Improving pod validation by using labels and the dynamic namespace.

This commit enhances the deploy_workload role's readiness check by ensuring
that all replicas of the deployment are running before proceeding.
Previously, the task would succeed if any pod was running.

  • Added a label selector (app={{ deploy_workload_deployment_name }}) to
    target the correct pods.
  • Modified the until condition to check if the number of
    running pods matches deploy_workload_replicas.

This change ensures that the deployment is fully up and running before
the playbook continues.

hanging the hello world example to adapt to the changes made on the
following roles:

  • install_skupper
  • deploy_workload

This change is needed to use the new variables defined at the roles that
will allow the installation of skupper to work properly and also
identify either the workload deploy and skupper deploy to be identified
by it's labels and count.

How Has This Been Tested?

make build
make hello

Types of Changes

  • Bug fix
  • New feature
  • Documentation change

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Changing the hello world example to adapt to the changes made on the
following roles:

- install_skupper
- deploy_workload

## Motivation and Context

This change is needed to use the new variables defined at the roles that
will allow the installation of skupper to work properly and also
identify either the workload deploy and skupper deploy to be identified
by it's labels and count.

## How Has This Been Tested?

Set the cluster details and the kubeconfig to ~/.kune/config in order to
use the example default.

```bash
make build
make hello
```

## Types of Changes

- [X] Bug fix
- [X] New feature

## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas

Signed-off-by: Rafael Zago <[email protected]>
feat(skupper): Implement namespace and cluster scope installation

## Motivation and Context

This commit refactors the Skupper installation role to support both namespace
and cluster-scoped deployments.  This provides greater flexibility for users
and aligns with best practices for Kubernetes deployments.

*   Defaulting to the 'skupper-operator' namespace.
*   Dynamically generating the Skupper Helm chart using a Makefile.
*   Adding conditional logic to handle namespace and cluster scope
installations.
*   Improving pod validation by using labels and the dynamic namespace.

## How Has This Been Tested?

```bash
make build
make hello```

## Types of Changes

- [X] Bug fix
- [X] New feature
- [X] Documentation change

## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes

Signed-off-by: Rafael Zago <[email protected]>
fix(deploy_workload): Ensure all replicas are running before proceeding

## Motivation and Context

This commit enhances the deploy_workload role's readiness check by ensuring
that all replicas of the deployment are running before proceeding.
Previously, the task would succeed if *any* pod was running.

Key changes:

*   Added a label selector (`app={{ deploy_workload_deployment_name }}`) to
target the correct pods.
*   Modified the `until` condition to check if the number of
running pods matches `deploy_workload_replicas`.

This change ensures that the deployment is fully up and running before
the playbook continues.

## How Has This Been Tested?

```bash
make build
make hello
```
## Types of Changes

- [X] Bug fix
- [X] New feature
- [X] Documentation change

## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes

Signed-off-by: Rafael Zago <[email protected]>
Bumping version to 0.1.10

## Motivation and Context

Changes on several roles

## How Has This Been Tested?

```bash
make build
make test```

## Types of Changes

- [X] Other (please specify): Bumping version

Signed-off-by: Rafael Zago <[email protected]>
@rafaelvzago rafaelvzago changed the title Zago Updates on skupper install and deploy workload roles Feb 5, 2025
labels.

Improve Skupper pod wait tasks with label selectors and robust readiness check

## Motivation and Context

It will cover reruns only looking to necessary pods.

## Types of Changes

- [X] Bug fix

## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes

Signed-off-by: Rafael Zago <[email protected]>
Copy link
Collaborator

@granzoto granzoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaelvzago rafaelvzago merged commit 2235aa3 into main Feb 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants