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

Deployment fixes #418

Merged
merged 7 commits into from
Aug 13, 2018
Merged
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
5 changes: 1 addition & 4 deletions deploy/aos-olm/manifests/0.6.0/files/08-ocs.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6962,7 +6962,7 @@ data:
namespace: placeholder
annotations:
tectonic-visibility: ocs
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v1.7.0","serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v2.3.2","serviceAccountName":"prometheus-k8s","securityContext": {}, "serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
spec:
replaces: prometheusoperator.0.15.0
displayName: Prometheus
Expand Down Expand Up @@ -7147,9 +7147,6 @@ data:
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
maturity: alpha
version: 0.22.2
customresourcedefinitions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
verbs: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch"]
9 changes: 0 additions & 9 deletions deploy/aos-olm/manifests/0.6.0/tasks/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,6 @@
files:
- "{{ mktemp.stdout }}/20-aggregated-edit.clusterrole.yaml"

- name: Apply aggregate-olm-edit ClusterRole manifest
oc_obj:
state: present
kind: ClusterRole
name: aggregate-olm-edit
namespace: operator-lifecycle-manager
files:
- "{{ mktemp.stdout }}/20-aggregated.clusterrole.yaml"

- name: Apply aggregate-olm-view ClusterRole manifest
oc_obj:
state: present
Expand Down
7 changes: 0 additions & 7 deletions deploy/aos-olm/manifests/0.6.0/tasks/remove_components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@
name: aggregate-olm-edit
namespace: operator-lifecycle-manager

- name: Remove aggregate-olm-edit ClusterRole manifest
oc_obj:
state: absent
kind: ClusterRole
name: aggregate-olm-edit
namespace: operator-lifecycle-manager

- name: Remove aggregate-olm-view ClusterRole manifest
oc_obj:
state: absent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: placeholder
annotations:
tectonic-visibility: ocs
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v1.7.0","serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v2.3.2","serviceAccountName":"prometheus-k8s","securityContext": {}, "serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
spec:
replaces: prometheusoperator.0.15.0
displayName: Prometheus
Expand Down Expand Up @@ -192,9 +192,6 @@ spec:
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
maturity: alpha
version: 0.22.2
customresourcedefinitions:
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/templates/20-aggregated-edit.clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
verbs: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
2 changes: 1 addition & 1 deletion deploy/chart/templates/21-aggregated-view.clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch"]
5 changes: 1 addition & 4 deletions deploy/upstream/manifests/0.6.0/08-ocs.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6962,7 +6962,7 @@ data:
namespace: placeholder
annotations:
tectonic-visibility: ocs
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v1.7.0","serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v2.3.2","serviceAccountName":"prometheus-k8s","securityContext": {}, "serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
spec:
replaces: prometheusoperator.0.15.0
displayName: Prometheus
Expand Down Expand Up @@ -7147,9 +7147,6 @@ data:
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
maturity: alpha
version: 0.22.2
customresourcedefinitions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
verbs: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: ["operators.coreos.com"]
resources: ["*"]
resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
verbs: ["get", "list", "watch"]
2 changes: 1 addition & 1 deletion test/e2e/installplan_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
etcdVersion = "3.2.13"
prometheusVersion = "v1.7.0"
prometheusVersion = "v2.3.2"
expectedEtcdNodes = 3
expectedPrometheusSize = 3
ocsConfigMap = "ocs"
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/ocs_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ func TestInstallPrometheusOCS(t *testing.T) {
"labels": map[string]interface{}{"prometheus": "test-prometheus"},
},
"spec": map[string]interface{}{
"replicas": expectedPrometheusSize,
"version": prometheusVersion,
"replicas": expectedPrometheusSize,
"version": prometheusVersion,
"securityContext": struct{}{},
},
}

t.Run("test prometheus object creation", func(t *testing.T) {
t.Skip("skipping prometheus object verification - currently broken")
err = c.CreateCustomResource(&unstructured.Unstructured{Object: prometheus})
require.NoError(t, err)

Expand Down