Skip to content

Commit

Permalink
feat(subscriptions): requeue dependent Subscriptions on CatalogSource
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
njhale committed Dec 8, 2018
1 parent 3ad92ac commit c2f6957
Show file tree
Hide file tree
Showing 83 changed files with 2,054 additions and 138 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,27 @@ $(CMDS):
run-local:
. ./scripts/build_local.sh
mkdir -p build/resources
. ./scripts/package-release.sh 1.0.0-local build/resources Documentation/install/local-values.yaml
. ./scripts/package-release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
. ./scripts/install_local.sh local build/resources
rm -rf build

deploy-local:
mkdir -p build/resources
. ./scripts/package-release.sh 1.0.0-local build/resources Documentation/install/local-values.yaml
. ./scripts/package-release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
. ./scripts/install_local.sh local build/resources
rm -rf build

run-local-shift:
. ./scripts/build_local_shift.sh
mkdir -p build/resources
. ./scripts/package-release.sh 1.0.0-local build/resources Documentation/install/local-values-shift.yaml
. ./scripts/package-release.sh 1.0.0 build/resources Documentation/install/local-values-shift.yaml
. ./scripts/install_local.sh local build/resources
rm -rf build

# useful if running e2e directly with `go test -tags=bare`
setup-bare:
. ./scripts/build_bare.sh
. ./scripts/package-release.sh 1.0.0-e2e test/e2e/resources test/e2e/e2e-bare-values.yaml
. ./scripts/package-release.sh 1.0.0 test/e2e/resources test/e2e/e2e-bare-values.yaml
. ./scripts/install_bare.sh $(shell cat ./e2e.namespace) test/e2e/resources

e2e:
Expand Down
2 changes: 1 addition & 1 deletion cmd/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

log "github.com/sirupsen/logrus"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/catalog"
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/signals"
Expand Down
2 changes: 1 addition & 1 deletion cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client"
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
{{- end }}
{{- end }}
clusterServiceVersions: |-
{{ include "packageserver.clusterserviceversion" . | nindent 4 }}
{{- include "packageserver.clusterserviceversion" . | nindent 4 }}
{{- range $path, $bytes := .Files.Glob "catalog_resources/olm-operators/**.clusterserviceversion.yaml" }}
{{- range $index, $line := $root.Files.Lines $path }}
{{- if eq $index 0 }}
Expand All @@ -27,7 +27,7 @@ data:
{{- end }}
{{- end }}
packages: |-
{{ include "packageserver.package" . | nindent 4 }}
{{- include "packageserver.package" . | nindent 4 }}
{{- range $path, $bytes := .Files.Glob "catalog_resources/olm-operators/**.package.yaml" }}
{{- range $index, $line := $root.Files.Lines $path }}
{{- if eq $index 0 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
install:
strategy: deployment
spec:
permissions:
clusterPermissions:
- serviceAccountName: packageserver
rules:
- apiGroups:
Expand Down Expand Up @@ -49,7 +49,7 @@
- create
- delete
- patch
- update
- update
deployments:
- name: packageserver
spec:
Expand Down
5 changes: 5 additions & 0 deletions deploy/ocp/manifests/0.8.0/0000_30_00-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ metadata:
name: openshift-operator-lifecycle-manager
labels:
openshift.io/run-level: "1"
---
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators
170 changes: 170 additions & 0 deletions deploy/ocp/manifests/0.8.0/0000_30_06-rh-operators.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4424,6 +4424,35 @@ data:
- acls
required:
- authentication
- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: deschedulers.descheduler.io
spec:
group: descheduler.io
names:
kind: Descheduler
listKind: DeschedulerList
plural: deschedulers
singular: descheduler
scope: Namespaced
version: v1alpha1
validation:
openAPIV3Schema:
properties:
spec:
strategies:
type: array
uniqueItems: true
minItems: 1
maxItems: 4
collectionFormat: pipes
items:
type: string
schedule:
type: string
pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -9550,6 +9579,142 @@ data:
path: authorization.type
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:label'
- apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
categories: openshift optional
certifiedLevel: Primed
containerImage: registry.svc.ci.openshift.org/openshift/origin-v4.0:descheduler-operator
createdAt: 2019/11/15
description: An operator to run the OpenShift descheduler
healthIndex: B
repository: https://github.com/openshift/descheduler-operator
support: Red Hat
name: descheduler.v0.0.1
namespace: openshift-descheduler-operator
spec:
description: |
# Descheduler for Kubernetes

## Introduction

Scheduling in Kubernetes is the process of binding pending pods to nodes, and is performed by
a component of Kubernetes called kube-scheduler. The scheduler's decisions, whether or where a
pod can or can not be scheduled, are guided by its configurable policy which comprises of set of
rules, called predicates and priorities. The scheduler's decisions are influenced by its view of
a Kubernetes cluster at that point of time when a new pod appears first time for scheduling.
As Kubernetes clusters are very dynamic and their state change over time, there may be desired
to move already running pods to some other nodes for various reasons

* Some nodes are under or over utilized.
* The original scheduling decision does not hold true any more, as taints or labels are added to
or removed from nodes, pod/node affinity requirements are not satisfied any more.
* Some nodes failed and their pods moved to other nodes.
New nodes are added to clusters.

Consequently, there might be several pods scheduled on less desired nodes in a cluster.
Descheduler, based on its policy, finds pods that can be moved and evicts them. Please
note, in current implementation, descheduler does not schedule replacement of evicted pods
but relies on the default scheduler for that.

## Note

Any api could be changed any time with out any notice. That said, your feedback is
very important and appreciated to make this project more stable and useful.

customresourcedefinitions:
owned:
- description: Represents an instance of a Descheduler application
displayName: Descheduler Operator
kind: Descheduler
name: deschedulers.descheduler.io
version: v1alpha1
displayName: Descheduler
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- services
- pods
- configmaps
- secrets
- names
- nodes
- pods/eviction
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
verbs:
- '*'
- apiGroups:
- batch
- extensions
resources:
- jobs
verbs:
- '*'
- apiGroups:
- descheduler.io
resources:
- '*'
verbs:
- '*'
serviceAccountName: openshift-descheduler
deployments:
- name: descheduler-operator
spec:
replicas: 1
selector:
matchLabels:
app: descheduler-operator
template:
metadata:
labels:
app: descheduler-operator
spec:
containers:
- command:
- descheduler-operator
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: descheduler-operator
image: registry.svc.ci.openshift.org/openshift/origin-v4.0:descheduler-operator
imagePullPolicy: Always
name: descheduler-operator
restartPolicy: Always
serviceAccount: openshift-descheduler
serviceAccountName: openshift-descheduler
terminationGracePeriodSeconds: 5
strategy: deployment
labels:
olm-owner-enterprise-app: descheduler-operator
olm-status-descriptors: descheduler.v0.0.1
maintainers:
- email: support@redhat.com
name: Red Hat
provider:
name: Red Hat
version: 0.0.1

- #! validate-crd: ./deploy/chart/templates/03-clusterserviceversion.crd.yaml
#! parse-kind: ClusterServiceVersion
apiVersion: operators.coreos.com/v1alpha1
Expand Down Expand Up @@ -11713,6 +11878,11 @@ data:
- name: preview
currentCSV: amqstreams.v1.0.0.beta

- packageName: descheduler
channels:
- name: alpha
currentCSV: descheduler.v0.0.1

- #! package-manifest: ./deploy/chart/catalog_resources/rh-operators/etcdoperator.v0.9.2.clusterserviceversion.yaml
packageName: etcd
channels:
Expand Down
79 changes: 79 additions & 0 deletions deploy/ocp/manifests/0.8.0/0000_30_13-operatorgroup.crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
# Source: olm/templates/0000_30_13-operatorgroup.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: operatorgroups.operators.coreos.com
spec:
group: operators.coreos.com
version: v1alpha2
versions:
- name: v1alpha2
served: true
storage: true
names:
plural: operatorgroups
singular: operatorgroup
kind: OperatorGroup
listKind: OperatorGroupList
scope: Namespaced
subresources:
# status enables the status subresource.
status: {}
validation:
openAPIV3Schema:
properties:
spec:
properties:
selector:
type: object
description: Label selector to find resources associated with or managed by the operator
properties:
matchLabels:
type: object
description: Label key:value pairs to match directly
matchExpressions:
type: array
description: A set of expressions to match against the resource.
items:
allOf:
- type: object
required:
- key
- operator
- values
properties:
key:
type: string
description: the key to match
operator:
type: string
description: the operator for the expression
enum:
- In
- NotIn
- Exists
- DoesNotExist
values:
type: array
description: set of values for the expression
serviceAccountName:
type: string
required:
- selector
type: object
status:
properties:
lastUpdated:
format: date-time
type: string
namespaces:
items:
type: string
type: array
required:
- namespaces
- lastUpdated
type: object
required:
- metadata
Loading

0 comments on commit c2f6957

Please sign in to comment.