Skip to content

Instantly share code, notes, and snippets.

@rsvalerio
rsvalerio / gist:794bd6a444ada3bbd9ad93f2b0b5fa55
Created August 12, 2021 22:46
kube-state-metrics changes since 1.7.2
v2.1.1 / 2021-07-28
[CHANGE] go.mod: Update and minimize dependencies #1529
[CHANGE] Use BuilderInterface instead of internal/store.Builder in metricshandler #1537
[CHANGE] Add WithAllowLabels to public BuilderInterface #1514
[BUGFIX] Fixes a bug where KSM did not export any metrics when it had no permissions for resources in at least one namespace #1499
v2.1.0 / 2021-06-04
[CHANGE] Update go version and dependencies #1493
[FEATURE] Add support for native TLS #1354
[FEATURE] Add wildcard option to metric-labels-allowlist #1403
@rsvalerio
rsvalerio / gist:bdbd72a8baef748727b7bfb127bc0369
Last active September 21, 2020 12:43
consul crash config
agent.json
```json
{
"bind_addr": "[redacted_ip]",
"bootstrap_expect": 3,
"client_addr": "0.0.0.0",
"config_entries": {
"bootstrap": [
{
@rsvalerio
rsvalerio / consul crash logs
Created September 21, 2020 12:31
reference to consul issue
2020-09-18T13:41:07.918Z 2020-09-18T13:41:07.655Z [INFO] agent.server.fsm: snapshot created: duration=73.995µs
2020-09-18T13:41:07.918Z 2020-09-18T13:41:07.655Z [INFO] snapshot: creating new snapshot: path=/consul/data/raft/snapshots/7808-882522967-1600436467655.tmp
2020-09-18T13:41:07.918Z 2020-09-18T13:41:07.655Z [INFO] agent.server.raft: starting snapshot up to: index=882522967
2020-09-18T13:41:07.919Z 2020-09-18T13:41:07.726Z [INFO] snapshot: reaping snapshot: path=/consul/data/raft/snapshots/7808-882488512-1600435239963
2020-09-18T13:41:07.919Z 2020-09-18T13:41:07.727Z [INFO] agent.server.raft: compacting logs: from=882496245 to=882512727
2020-09-18T13:41:07.919Z 2020-09-18T13:41:07.782Z [INFO] agent.server.raft: snapshot complete up to: index=882522967
2020-09-18T13:43:07.669Z github.com/hashicorp/go-immutable-radix.(*Iterator).Next(0xc0077183a0, 0xc006c7f260, 0x0, 0x0, 0xc0033fae40, 0x0, 0xffffffffffffffff)
2020-09-18T13:43:07.669Z 2020-09-18T13:43:07.365Z [INFO] agent.server: deregistering memb
@rsvalerio
rsvalerio / playbook.yml
Created June 18, 2018 17:15
disk and vm management in aws with ansible
#!/usr/bin/env ansible-playbook
- hosts: localhost
gather_facts: no
become: no
vars:
service: couchdb
region: us-east-1
vm_name: disk-test-rodrigo-delete-me-please2
@rsvalerio
rsvalerio / gist:639501ccc2b1bc29e1b3b8f6d07fe040
Created July 4, 2017 16:09
Switch jenkins scm trigger from poll to webhook
import hudson.model.*
import hudson.triggers.*
import com.cloudbees.jenkins.*
TriggerDescriptor SCM_TRIGGER_DESCRIPTOR = Hudson.instance.getDescriptorOrDie(SCMTrigger.class)
assert SCM_TRIGGER_DESCRIPTOR != null;
for(item in Hudson.instance.items)
{
@rsvalerio
rsvalerio / netbox-ansible-inventory
Created June 28, 2017 09:02
netbox-ansible-inventory
{% regroup queryset|dictsort:"device_role.id" by device_role as per_role %}
{% for role in per_role %}
[{{ role.grouper.slug }}]
{% for device in role.list %}{% if device.primary_ip %}
{{ device.name|slugify }} ansible_host={{ device.primary_ip.address.ip }}{% endif %}{% endfor %}
{% endfor %}
@rsvalerio
rsvalerio / install_jenkins_plugin.sh
Created December 13, 2016 23:40 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
<profiles>
<profile>
<id>travis</id>
<activation>
<property>
<name>env.TRAVIS</name>
<value>true</value>
</property>
</activation>
<build>
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>utf-8</charset>
<Pattern>[%p] %c - %m%n</Pattern>
</encoder>
</appender>
<logger name="javax.activation" level="warn"/>