<commit_before># Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: awssqs-controller
  labels:
    contrib.eventing.knative.dev/release: devel
rules:
- apiGroups:
  - apps
  resources:
  - deployments
  verbs: &everything
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete

- apiGroups:
  - ""
  resources:
  - events
  - configmaps
  verbs: *everything

- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs: *everything

- apiGroups:
  - sources.knative.dev
  resources:
  - awssqssources
  verbs:
  - get
  - list
  - watch
  - update
  - patch
- apiGroups:
  - sources.knative.dev
  resources:
  - awssqssources/status
  - awssqssources/finalizers
  verbs:
  - get
  - update
  - patch
- apiGroups:
# TODO on these and the eventing ones that this should be replaced with
# an aggregated role for watching Addressables.
  - serving.knative.dev
  resources:
  - services
  verbs:
  - get
  - list
  - watch
- apiGroups:
# TODO on these and the eventing ones that this should be replaced with
# an aggregated role for watching Addressables.
  - eventing.knative.dev
  resources:
  - channels
  verbs:
  - get
  - list
  - watch
# Secrets read
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list


---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# See https://github.com/knative/eventing/blob/master/config/200-source-observer-clusterrole.yaml.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: eventing-contrib-awssqs-source-observer
  labels:
    eventing.knative.dev/release: devel
    duck.knative.dev/source: "true"
rules:
  - apiGroups:
      - "sources.knative.dev"
    resources:
      - "awssqssources"
    verbs:
      - get
      - list
      - watch<commit_msg>Adding services and eventtypes rbac to sqssource clusterrole (#1043)<commit_after># Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: awssqs-controller
  labels:
    contrib.eventing.knative.dev/release: devel
rules:
- apiGroups:
  - apps
  resources:
  - deployments
  verbs: &everything
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete

- apiGroups:
  - ""
  resources:
  - events
  - configmaps
  verbs: *everything

- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs: *everything

- apiGroups:
  - sources.knative.dev
  resources:
  - awssqssources
  verbs:
  - get
  - list
  - watch
  - update
  - patch
- apiGroups:
  - sources.knative.dev
  resources:
  - awssqssources/status
  - awssqssources/finalizers
  verbs:
  - get
  - update
  - patch
- apiGroups:
# TODO on these and the eventing ones that this should be replaced with
# an aggregated role for watching Addressables.
  - serving.knative.dev
  resources:
  - services
  verbs:
  - get
  - list
  - watch
- apiGroups:
# TODO on these and the eventing ones that this should be replaced with
# an aggregated role for watching Addressables.
  - eventing.knative.dev
  resources:
  - channels
  - eventtypes
  verbs:
  - get
  - list
  - watch
# Secrets & Services read
- apiGroups:
  - ""
  resources:
  - secrets
  - services
  verbs:
  - get
  - list
  - watch


---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# See https://github.com/knative/eventing/blob/master/config/200-source-observer-clusterrole.yaml.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: eventing-contrib-awssqs-source-observer
  labels:
    eventing.knative.dev/release: devel
    duck.knative.dev/source: "true"
rules:
  - apiGroups:
      - "sources.knative.dev"
    resources:
      - "awssqssources"
    verbs:
      - get
      - list
      - watch
{'fraction_non_alphanumeric': 0.08928571428571429, 'fraction_numerical': 0.0072231139646869984, 'mean_word_length': 2.89453125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6626443', 'n_tokens_mistral': 1640, 'n_tokens_neox': 1592, 'n_words': 493}