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

added flink turbonomic orm files #2297

Open
wants to merge 1 commit into
base: scripts-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions turbonomic/operands/ibm-opencontent-flink-operand-orm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: devops.turbonomic.io/v1alpha1
kind: OperatorResourceMapping
metadata:
name: flink-jobmanager-orm
namespace: $namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we standardized the namespace placeholder?

Copy link
Member

Choose a reason for hiding this comment

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

Unofficially, everyone so far has it as $namespace. But let's clarify this now to avoid confusion, and to make the script easier.

Some suggestions would be:

  • {{ placeholder_ns }}
  • __placeholder_ns__
  • <placeholder_ns>

I prefer the first one {{ }} because it's used in other areas with templating, such as go templates.

spec:
mappings:
patterns:
- owned:
apiVersion: apps/v1
kind: ReplicaSet
name: job-manager
path: '.spec.containers[?(@.name=="tls-proxy")].resources'
ownerPath: .spec.containers.resources
- owned:
apiVersion: apps/v1
kind: ReplicaSet
name: job-manager
path: '.spec.containers[?(@.name=="flink-main-container")].resources'
ownerPath: .spec.containers.resources
selectors:
flink_deploy:
matchLabels:
app.kubernetes.io/name: ibm-opencontent-flink
owner:
apiVersion: flink.ibm.com/v1beta1
kind: FlinkDeployment
name: test-flink-deployment
---
apiVersion: devops.turbonomic.io/v1alpha1
kind: OperatorResourceMapping
metadata:
name: flink-taskmanager-orm
namespace: $namespace
spec:
mappings:
patterns:
- owned:
apiVersion: apps/v1
kind: ReplicaSet
name: taskmanager
path: '.spec.containers[?(@.name=="flink-main-container")].resources'
ownerPath: '.spec.containers.resources'
selectors:
flink_deploy:
matchLabels:
app.kubernetes.io/name: ibm-opencontent-flink
owner:
apiVersion: flink.ibm.com/v1beta1
kind: FlinkDeployment
name: test-flink-deployment
30 changes: 30 additions & 0 deletions turbonomic/operators/ibm-opencontent-flink-operator-orm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: devops.turbonomic.io/v1alpha1
kind: OperatorResourceMapping
metadata:
name: flink-operator-orm
namespace: $namespace
spec:
mappings:
patterns:
- owned:
apiVersion: apps/v1
kind: Deployment
path: .spec.template.spec.containers[?(@.name=="flink-kubernetes-operator")].resources
name: flink-kubernetes-operator
ownerPath: .spec.install.spec.deployments[?(@.name=="flink-kubernetes-operator")].spec.template.spec.containers[?(@.name=="flink-kubernetes-operator")].resources
selector: flink_operator
- owned:
apiVersion: apps/v1
kind: Deployment
path: .spec.template.spec.containers[?(@.name=="flink-webhook")].resources
name: flink-kubernetes-operator
ownerPath: .spec.install.spec.deployments[?(@.name=="flink-kubernetes-operator")].spec.template.spec.containers[?(@.name=="flink-webhook")].resources
selector: flink_operator
selectors:
flink_operator:
matchLabels:
app.kubernetes.io/name: flink-kubernetes-operator
owner:
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
name: ibm-opencontent-flink.v2.0.6
Copy link
Contributor

Choose a reason for hiding this comment

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

We want to avoid hardcoding CSV names. See parent epic for the label matching instead.

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the operator ORM for the time being so it's not accidentally applied by customers until we have it fully supported, i.e. update our CSVs with a reliable label for label matching.