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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: flink-taskmanager | |
spec: | |
revisionHistoryLimit: 2 | |
template: | |
metadata: | |
labels: | |
app: flink |
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
this.renditionSettingLRUCacheHitCounter = getRuntimeContext() | |
.getMetricGroup() | |
.addGroup("log_enrichment.cache") | |
.counter("hit"); | |
this.renditionSettingLRUCacheMissCounter = getRuntimeContext() | |
.getMetricGroup() | |
.addGroup("log_enrichment.cache") | |
.counter("miss"); |
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
FROM flink:1.13.0-scala_2.11-java8 | |
# Configure JVM security options, including disabling DNS caching | |
RUN echo "networkaddress.cache.ttl=0" >> $JAVA_HOME/lib/security/java.security | |
# Add Hadoop config file | |
RUN mkdir $FLINK_HOME/etc-hadoop | |
COPY core-site.xml $FLINK_HOME/etc-hadoop/ | |
# Add JAR dependencies |
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
curl --request PUT \ | |
--url http://localhost:8083/connectors/demo-kinesis-connector/config \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"name": "demo-kinesis-connector", | |
"connector.class": "com.amazon.kinesis.kafka.AmazonKinesisSinkConnector", | |
"tasks.max": "6", | |
"errors.retry.timeout": "300000", | |
"topics": "demo-event-stream-export", | |
"roleSessionName": "demo-kafka-connect-connector", |
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
curl --request PUT \ | |
--url http://localhost:8083/connectors/demo-gcp-connector/config \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"connector.class": "com.google.pubsub.kafka.sink.CloudPubSubSinkConnector", | |
"tasks.max": "6", | |
"errors.retry.timeout": "300000", | |
"topics": "demo-event-stream-export", | |
"name": "demo-gcp-connector", | |
"cps.project": "external-mux", |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: kafka-connect | |
name: kafka-connect | |
namespace: replace-with-your-namespace | |
spec: | |
progressDeadlineSeconds: 600 | |
selector: |
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
FROM confluentinc/cp-kafka-connect:5.2.3 | |
# Add Google Cloud PubSub connector | |
# See https://github.com/GoogleCloudPlatform/pubsub/tree/master/kafka-connector | |
COPY cps-kafka-connector.jar /usr/share/java/kafka/cps-kafka-connector.jar | |
# Add AWS Kinesis sink connector | |
# See https://github.com/awslabs/kinesis-kafka-connector | |
COPY amazon-kinesis-kafka-connector-0.0.9-SNAPSHOT.jar /usr/share/java/kafka/amazon-kinesis-kafka-connector-0.0.9-SNAPSHOT.jar |
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
package main | |
import ( | |
"bytes" | |
"crypto/md5" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" |
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
groups: | |
- name: ./certificate-expiry-monitor.rules | |
rules: | |
- alert: ExpiredTLSCertificatesCritical | |
expr: sum(certificate_expiry_monitor_certificate{status="expired"}) by (domain, ns) > 0 | |
for: 1m | |
labels: | |
severity: critical | |
annotations: | |
description: There is an expired TLS certificate for the frontend domain {{ $labels.domain}} in namespace {{ $labels.ns }}. The ingress pods might not have renewed the certificate. You might need to delete them. Check the Grafana dashboard for TLS certificate expiry. |
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
require 'base64' | |
require 'jwt' | |
def sign_url(playback_id, audience, expires, signing_key_id, private_key, params = {}) | |
rsa_private = OpenSSL::PKey::RSA.new(Base64.decode64(private_key)) | |
payload = {sub: playback_id, exp: expires.to_i, kid: signing_key_id, aud: audience} | |
payload.merge!(params) | |
JWT.encode(payload, rsa_private, 'RS256') | |
end |
NewerOlder