-
Notifications
You must be signed in to change notification settings - Fork 569
Admission Webhooks for OLM #884
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
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f1470e4
wip
awgreene cf010a5
Merge branch 'webhooks' of github.com:awgreene/operator-lifecycle-man…
ecordell 1702b4d
feat(admission): add scaffolding for an admission webhook
ecordell 9ec9ebb
chore(deploy): add admission webhook to chart
ecordell d4ba4ec
feat(rbacgen): add an rbac generation that validates user permission
ecordell 200073a
docs(rbac): add a small doc on rbac generation
ecordell 1af1132
feat(admit): use olm to manage the admission webhook for olm
ecordell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
84 changes: 83 additions & 1 deletion
84
deploy/chart/templates/0000_50_olm_15-packageserver.clusterserviceversion.yaml
This file contains hidden or 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 +1,83 @@ | ||
| {{- include "packageserver.clusterserviceversion" . }} | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: ClusterServiceVersion | ||
| metadata: | ||
| name: packageserver | ||
| namespace: {{ .Values.namespace }} | ||
| labels: | ||
| olm.version: {{ .Chart.Version }} | ||
| {{- if .Values.writePackageServerStatusName }} | ||
| olm.clusteroperator.name: {{ .Values.writePackageServerStatusName }} | ||
| {{- end }} | ||
| spec: | ||
| displayName: Package Server | ||
| description: Represents an Operator package that is available from a given CatalogSource which will resolve to a ClusterServiceVersion. | ||
| minKubeVersion: {{ .Values.minKubeVersion }} | ||
| keywords: ['packagemanifests', 'olm', 'packages'] | ||
| maintainers: | ||
| - name: Red Hat | ||
| email: openshift-operators@redhat.com | ||
| provider: | ||
| name: Red Hat | ||
| links: | ||
| - name: Package Server | ||
| url: https://github.com/operator-framework/operator-lifecycle-manager/tree/master/pkg/package-server | ||
| installModes: | ||
| - type: OwnNamespace | ||
| supported: true | ||
| - type: SingleNamespace | ||
| supported: true | ||
| - type: MultiNamespace | ||
| supported: true | ||
| - type: AllNamespaces | ||
| supported: true | ||
| install: | ||
| strategy: deployment | ||
| spec: | ||
| clusterPermissions: | ||
| - serviceAccountName: olm-operator-serviceaccount | ||
| rules: | ||
| - apiGroups: | ||
| - authorization.k8s.io | ||
| resources: | ||
| - subjectaccessreviews | ||
| verbs: | ||
| - create | ||
| - get | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - configmaps | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - "operators.coreos.com" | ||
| resources: | ||
| - catalogsources | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - "packages.operators.coreos.com" | ||
| resources: | ||
| - packagemanifests | ||
| verbs: | ||
| - get | ||
| - list | ||
| deployments: | ||
| - name: packageserver | ||
| {{- include "packageserver.deployment-spec" . | nindent 8 }} | ||
| maturity: alpha | ||
| version: {{ .Chart.Version }} | ||
| apiservicedefinitions: | ||
| owned: | ||
| - group: packages.operators.coreos.com | ||
| version: v1 | ||
| kind: PackageManifest | ||
| name: packagemanifests | ||
| displayName: PackageManifest | ||
| description: A PackageManifest is a resource generated from existing CatalogSources and their ConfigMaps | ||
| deploymentName: packageserver | ||
| containerPort: {{ .Values.package.service.internalPort }} |
64 changes: 64 additions & 0 deletions
64
deploy/chart/templates/0000_50_olm_16-olm.clusterserviceversion.yaml
This file contains hidden or 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,64 @@ | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: ClusterServiceVersion | ||
| metadata: | ||
| name: olm | ||
| namespace: {{ .Values.namespace }} | ||
| labels: | ||
| olm.version: {{ .Chart.Version }} | ||
| spec: | ||
| displayName: Operator Lifecycle Manager | ||
| description: later | ||
| minKubeVersion: {{ .Values.minKubeVersion }} | ||
| keywords: ['operat', 'olm', 'lifecycle'] | ||
| maintainers: | ||
| - name: Red Hat | ||
| email: openshift-operators@redhat.com | ||
| provider: | ||
| name: Red Hat | ||
| installModes: | ||
| - type: OwnNamespace | ||
| supported: true | ||
| - type: SingleNamespace | ||
| supported: true | ||
| - type: MultiNamespace | ||
| supported: true | ||
| - type: AllNamespaces | ||
| supported: true | ||
| install: | ||
| strategy: deployment | ||
| spec: | ||
| clusterPermissions: | ||
| - serviceAccountName: olm-operator-serviceaccount | ||
| rules: | ||
| - apiGroups: ["*"] | ||
| resources: ["*"] | ||
| verbs: ["*"] | ||
| - nonResourceURLs: ["*"] | ||
| verbs: ["*"] | ||
| deployments: | ||
| - name: olm-operator | ||
| {{- include "olm.deployment-spec" . | nindent 8 }} | ||
| maturity: alpha | ||
| version: {{ .Chart.Version }} | ||
| webhookdefinitions: | ||
| - name: csv.operators.coreos.com | ||
| type: ValidatingAdmissionWebhook | ||
| deploymentName: olm-operator | ||
| webhookPath: "/operator-admit" | ||
| containerPort: 6789 | ||
| sideEffects: "None" | ||
| failurePolicy: Fail | ||
| admissionReviewVersions: | ||
| - "v1" | ||
| - "v1beta1" | ||
| rules: | ||
| - apiGroups: | ||
| - "operators.coreos.com" | ||
| apiVersions: | ||
| - v1alpha1 | ||
| operations: | ||
| - CREATE | ||
| resources: | ||
| - clusterserviceversions | ||
| scope: "Namespaced" | ||
| timeoutSeconds: 1 |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.