# Enable user workload monitoring (for user's namespace PrometheusRule)
oc -n openshift-monitoring get configmap cluster-monitoring-config -o=jsonpath='{.data.config\.yaml}' | yq w - 'enableUserWorkload' true > /tmp/config.yaml
oc set data -n openshift-monitoring configmap cluster-monitoring-config --from-file=config.yaml=/tmp/config.yaml
# Enable user workload alerting (for user's namespace AlertmanagerConfig)
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
apiVersion: eventing.knative.dev/v1alpha1 | |
kind: EventPolicy | |
metadata: | |
name: my-event-policy | |
namespace: default | |
spec: | |
to: # ToEventPolicy struct -> empty "to" means applies to all resources in the namespace | |
- selector: # Object selector, no gvk means applies to all gvks that support authz | |
matchLabels: | |
app: my-broker |
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
apiVersion: operator.serverless.openshift.io/v1alpha1 | |
kind: KnativeKafka | |
metadata: | |
name: knative-kafka | |
namespace: knative-eventing | |
spec: | |
# ... other spec fields omitted ... | |
# Change config-kafka-broker-data-plane ConfigMap | |
# We *MUST* specify all values as otherwise some values will be different (Config are not merged) |
-
Install cert-manager
-
Apply the
cert-manager-spec-update-issue.yaml
file (it's down below) -
Get the certificate
$ k get certificates -n cert-manager-issue server-tls -oyaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
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
function git_reset_submodules() { | |
git submodule deinit -f . | |
git submodule update --init | |
} |
url=...
curl -X POST -v -H "content-type: application/json" -H "ce-specversion: 1.0" -H "ce-source: my/curl/command" -H "ce-type: my.demo.event" -H "ce-id: 0815" -d '{"name":"Curl"}' "${url}"
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: apiserversource-sa | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: apiserversource-role | |
rules: |
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
apiVersion: kafka.strimzi.io/v1beta2 | |
kind: KafkaTopic | |
metadata: | |
name: knative-demo-topic | |
namespace: kafka | |
labels: | |
strimzi.io/cluster: my-cluster | |
spec: | |
partitions: 3 | |
replicas: 1 |
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
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: seldon-deployment-addressable-resolver | |
labels: | |
app.kubernetes.io/version: devel | |
duck.knative.dev/addressable: "true" | |
# Do not use this role directly. These rules will be added to the "addressable-resolver" role. | |
rules: | |
- apiGroups: |
NewerOlder