Hide
Feature: Publish Application Agent to worker cluster
Scenario: On Cluster Environment creation, Primaza Application Agent is successfully deployed to application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
Scenario: On Cluster Environment update, Primaza Application Agent is successfully removed from application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
And On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces: []
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is removed from namespace "applications"
Scenario: On Cluster Environment update, Primaza Application Agent is successfully published into application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces: []
"""
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
Scenario: On Cluster Environment deletion, Primaza Application Agent is successfully published into application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
When On Primaza Cluster "primaza-main", Resource is deleted
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is removed from namespace "applications"
Scenario: On Cluster Environment creation, if application namespace does not exists ClusterEnvironment status is updated
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Worker Cluster "primaza-worker", application namespace "not-existing-app-ns" does not exist
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
- not-existing-app-ns
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
And On Worker Cluster "primaza-worker", namespace "not-existing-app-ns" does not exist
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status is "Partial"
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status conditions report errors publishing Application agent in namespace "not-existing-app-ns"
Feature: Publish Service Agent to worker cluster
Scenario: On Cluster Environment creation, Primaza Service Agent is successfully deployed to service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
Scenario: On Cluster Environment update, Primaza Service Agent is successfully removed from service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
And On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces: []
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is removed from namespace "services"
Scenario: On Cluster Environment update, Primaza Service Agent is successfully published into service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces: []
"""
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
Scenario: On Cluster Environment deletion, Primaza Service Agent is successfully published into service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
When On Primaza Cluster "primaza-main", Resource is deleted
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is removed from namespace "services"
Scenario: On Cluster Environment creation, if service namespace does not exists ClusterEnvironment status is updated
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Worker Cluster "primaza-worker", service namespace "not-existing-app-ns" does not exist
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
- not-existing-app-ns
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into namespace "services"
And On Worker Cluster "primaza-worker", namespace "not-existing-app-ns" does not exist
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status is "Partial"
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status conditions report errors publishing Services Agent in namespace "not-existing-app-ns"
Show
Feature: Publish Application Agent to worker cluster
Scenario: On Cluster Environment creation, Primaza Application Agent is successfully deployed to application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
Scenario: On Cluster Environment update, Primaza Application Agent is successfully removed from application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
And On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces: []
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is removed from namespace "applications"
Scenario: On Cluster Environment update, Primaza Application Agent is successfully published into application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces: []
"""
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
Scenario: On Cluster Environment deletion, Primaza Application Agent is successfully published into application namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
When On Primaza Cluster "primaza-main", Resource is deleted
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is removed from namespace "applications"
Scenario: On Cluster Environment creation, if application namespace does not exists ClusterEnvironment status is updated
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", application namespace "applications" exists
And On Worker Cluster "primaza-worker", application namespace "not-existing-app-ns" does not exist
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
applicationNamespaces:
- applications
- not-existing-app-ns
"""
Then On Worker Cluster "primaza-worker", Primaza Application Agent is deployed into namespace "applications"
And On Worker Cluster "primaza-worker", namespace "not-existing-app-ns" does not exist
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status is "Partial"
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status conditions report errors publishing Application agent in namespace "not-existing-app-ns"
Feature: Publish Service Agent to worker cluster
Scenario: On Cluster Environment creation, Primaza Service Agent is successfully deployed to service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
Scenario: On Cluster Environment update, Primaza Service Agent is successfully removed from service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
And On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces: []
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is removed from namespace "services"
Scenario: On Cluster Environment update, Primaza Service Agent is successfully published into service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces: []
"""
When On Primaza Cluster "primaza-main", Resource is updated
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into "services" namespace
Scenario: On Cluster Environment deletion, Primaza Service Agent is successfully published into service namespace
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
When On Primaza Cluster "primaza-main", Resource is deleted
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is removed from namespace "services"
Scenario: On Cluster Environment creation, if service namespace does not exists ClusterEnvironment status is updated
Given Primaza Cluster "primaza-main" is running
And Worker Cluster "primaza-worker" for "primaza-main" is running
And Clusters "primaza-main" and "primaza-worker" can communicate
And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
And On Worker Cluster "primaza-worker", service namespace "services" exists
And On Worker Cluster "primaza-worker", service namespace "not-existing-app-ns" does not exist
When On Primaza Cluster "primaza-main", Resource is created
"""
apiVersion: primaza.io/v1alpha1
kind: ClusterEnvironment
metadata:
name: primaza-worker
namespace: primaza-system
spec:
environmentName: dev
clusterContextSecret: primaza-kw
serviceNamespaces:
- services
- not-existing-app-ns
"""
Then On Worker Cluster "primaza-worker", Primaza Service Agent is deployed into namespace "services"
And On Worker Cluster "primaza-worker", namespace "not-existing-app-ns" does not exist
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status is "Partial"
And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker"'s status conditions report errors publishing Services Agent in namespace "not-existing-app-ns"