-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(insights): use separate deployment for Insights (#962)
- Loading branch information
Showing
17 changed files
with
376 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: insights | ||
namespace: system | ||
labels: | ||
control-plane: controller-manager | ||
spec: | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
annotations: | ||
kubectl.kubernetes.io/default-container: insights | ||
spec: | ||
serviceAccountName: insights | ||
securityContext: | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
containers: | ||
- name: insights | ||
args: | ||
- "--health-probe-bind-address=:8081" | ||
- "--metrics-bind-address=0" # Metrics disabled | ||
- "--leader-elect" | ||
image: registry.redhat.io/insights-runtimes-tech-preview/runtimes-inventory-rhel8-operator:latest | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
env: | ||
- name: WATCH_NAMESPACE | ||
value: "" | ||
- name: OPERATOR_NAME | ||
value: placeholder | ||
- name: OPERATOR_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: INSIGHTS_ENABLED | ||
value: "true" | ||
resources: | ||
limits: | ||
cpu: 1000m | ||
memory: 256Mi | ||
requests: | ||
cpu: 100m | ||
memory: 64Mi | ||
terminationGracePeriodSeconds: 10 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,41 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
# Adds namespace to all resources. | ||
namespace: cryostat-operator-system | ||
|
||
# Value of this field is prepended to the | ||
# names of all resources, e.g. a deployment named | ||
# "wordpress" becomes "alices-wordpress". | ||
# Note that it should also match with the prefix (text before '-') of the namespace | ||
# field above. | ||
namePrefix: cryostat-operator- | ||
|
||
# Labels to add to all resources and selectors. | ||
commonLabels: | ||
app.kubernetes.io/name: cryostat-operator-insights | ||
|
||
resources: | ||
- ../default | ||
- deployment.yaml | ||
- service_account.yaml | ||
- role.yaml | ||
- role_binding.yaml | ||
- leader_election_role.yaml | ||
- leader_election_role_binding.yaml | ||
|
||
replacements: | ||
- source: | ||
fieldPath: metadata.name | ||
kind: Deployment | ||
name: insights | ||
targets: | ||
- fieldPaths: | ||
- spec.template.spec.containers.[name=insights].env.[name=OPERATOR_NAME].value | ||
select: | ||
kind: Deployment | ||
name: insights | ||
|
||
patchesStrategicMerge: | ||
- insights_patch.yaml | ||
images: | ||
- name: insights | ||
newName: registry.redhat.io/insights-runtimes-tech-preview/runtimes-inventory-rhel8-operator | ||
newTag: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# permissions to do leader election. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: role | ||
app.kubernetes.io/instance: insights-leader-election-role | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: runtimes-inventory-operator | ||
app.kubernetes.io/part-of: runtimes-inventory-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: insights-leader-election-role | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: rolebinding | ||
app.kubernetes.io/instance: insights-leader-election-rolebinding | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: runtimes-inventory-operator | ||
app.kubernetes.io/part-of: runtimes-inventory-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: insights-leader-election-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: insights-leader-election-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: insights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: insights-role | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resourceNames: | ||
- pull-secret | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- config.openshift.io | ||
resources: | ||
- clusterversions | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: insights-role | ||
namespace: system | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- update | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps/finalizers | ||
- secrets | ||
- services | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- update | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
- deployments/finalizers | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- update | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: clusterrolebinding | ||
app.kubernetes.io/instance: insights-rolebinding | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: runtimes-inventory-operator | ||
app.kubernetes.io/part-of: runtimes-inventory-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: insights-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: insights-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: insights | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: rolebinding | ||
app.kubernetes.io/instance: insights-rolebinding | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: runtimes-inventory-operator | ||
app.kubernetes.io/part-of: runtimes-inventory-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: insights-rolebinding | ||
namespace: system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: insights-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: insights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: insights |
Oops, something went wrong.