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 ( | |
"flag" | |
"fmt" | |
"log" | |
"log/syslog" | |
"os" | |
"os/signal" | |
"strconv" |
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: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
annotations: | |
controller-gen.kubebuilder.io/version: v0.14.0 | |
labels: | |
calyptia.core: core-operator | |
name: ingestchecks.core.calyptia.com | |
spec: | |
group: core.calyptia.com |
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
1. Set Up an OIDC Identity Provider in AWS | |
Create an OIDC Identity Provider in AWS IAM: | |
Navigate to the IAM section in the AWS Management Console. | |
Choose "Identity Providers," then "Create Provider." | |
Select "OpenID Connect" as the provider type. | |
For the provider URL, you need the OIDC discovery endpoint URL from your k3s cluster. This URL is typically obtained from your Kubernetes cluster's API server configuration. | |
Add the thumbprint of the OIDC provider's SSL certificate. | |
2. Configure k3s for OIDC | |
Configure k3s with OIDC Details: |
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 forward_lookup(hostname) | |
local ip = "" | |
local success, socket = pcall(require, "socket") | |
if success then | |
ip = socket.dns.toip(hostname) | |
end | |
print(ip, success, socket) | |
return ip | |
end |
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
// File autogenerated with github.com/calyptia/config-validator-api/tools | |
// Don't edit manually. | |
package main | |
type ConfigMapOptsT map[string]map[string][]string | |
var ConfigMapOpts = ConfigMapOptsT{ | |
"input": { | |
"thermal": []string{ |
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
import: | |
- https://raw.githubusercontent.com/niedbalski/repeat/master/collections/netstat.yaml | |
- https://raw.githubusercontent.com/niedbalski/repeat/master/collections/sockstat.yaml | |
- https://raw.githubusercontent.com/niedbalski/repeat/master/collections/lxc.yaml | |
collections: | |
# sar: | |
# run-once: true | |
# exit-codes: 0 127 126 | |
# script: | | |
# #!/bin/bash |
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
#!/bin/bash | |
set -x | |
time mysql -ukeystone_admin -pYourPassHERE -hYourHostHERE <<EOF | |
use keystone; | |
drop table if exists temp_tokens; | |
create table temp_tokens | |
as (select * from token where expires >= NOW()); | |
select count(*) from temp_tokens; | |
truncate table token; | |
insert into token select * from temp_tokens; |
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
#!/bin/bash | |
# Displays running processes in descending order of OOM score | |
printf 'PID\tOOM Score\tOOM Adj\tCommand\n' | |
while read -r pid comm; do [ -f /proc/$pid/oom_score ] && [ $(cat /proc/$pid/oom_score) != 0 ] && printf '%d\t%d\t\t%d\t%s\n' "$pid" "$(cat /proc/$pid/oom_score)" "$(cat /proc/$pid/oom_score_adj)" "$comm"; done < <(ps -e -o pid= -o comm=) | sort -k 2nr |
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 https://gist.github.com/niedbalski/a6511e9bd3b6c674d9eb767211e5ccf3/raw/1909e266dcf5dc15ee43deef471f87b209d1ce7c/juju-pwhash | |
# p=$(openssl rand -hex 12) && printf "agent.conf=%s\nmongodb=%s\n" $p $(./juju-pwhash -p ${p}) | |
agent.conf=2c0bdfcd9f61d5248005ff71 | |
mongodb=9DYXMt1+hfklY2NiFcw2Y5dF | |
edit the agent.conf of the unit manually and change apipassword to ^^ agent.conf. | |
$ juju ssh -m controller 0 | |
$ sudo su | |
# source <(curl -s https://gist.githubusercontent.com/msplival/b479edf76c4f9d1dda7a69e3addab6f5/raw/1d10eea9f0d1b459ee1fe4108cf9217eb3a46b5c/dialmgo-bionic) |
This file has been truncated, but you can view the full file.