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
What i need: | |
- wildcard letencrypt certificate(cert-manager) with DNS challange in CF (Cloudflare) in k8s/k3s with ingress-nginx controller | |
as example below you need this steps: | |
- install cert-manager | |
- get cloudflare API TOKEN for DNS managment | |
- setup wildcard DNS A record pointed to hetzner LB(ingress-nginx) ip | |
- create secret with cloudflare API TOKEN | |
- create kind: ClusterIssuer |
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
# edit values.yml or subchart | |
kube-state-metrics: | |
nodeSelector: {} | |
affinity: {} | |
tolerations: [] | |
grafana: | |
nodeSelector: {} | |
affinity: {} | |
tolerations: [] |
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
# "cert-manager/challenges/finalizer: error cleaning up challenge" err=< | |
# while attempting to find Zones for domain _acme-challenge.domain.com. | |
# hile querying the Cloudflare API for GET "/zones?name=_acme-challenge.domain.com" | |
# Error: 6003: Invalid request headers<- 6103: Invalid format for X-Auth-Key header | |
# fix | |
https://github.com/cert-manager/cert-manager/issues/2384#issuecomment-575301692 |
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
# to delete stucked challenge.acme.cert-manager.io | |
# edit challenge.acme.cert-manager.io resource | |
# remove finalizers | |
# save | |
# delete it |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import re, os | |
''' | |
Parsing Translations.txt and creating Resources.resx with different languages | |
Translations format: b([0-9]+,[1-5])='String UTF-8' |
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
def fenPass(fen): | |
""" | |
""" | |
regexMatch=re.match('\s*^(((?:[rnbqkpRNBQKP1-8]+\/){7})[rnbqkpRNBQKP1-8]+)\s([b|w])\s([K|Q|k|q]{1,4})\s(-|[a-h][1-8])\s(\d+\s\d+)$', fen) | |
if regexMatch: | |
regexList = regexMatch.groups() | |
fen = regexList[0].split("/") | |
if len(fen) != 8: | |
raise ValueError("expected 8 rows in position part of fen: {0}".format(repr(fen))) |
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
''' | |
Python Quick Reference | |
https://github.com/justmarkham/python-reference | |
By Kevin Markham ([email protected]) | |
http://www.dataschool.io | |
Table of Contents: | |
Imports | |
Data Types | |
Math | |
Comparisons and Boolean Operations |
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 time | |
import tornado.web | |
from tornado.ioloop import IOLoop | |
from tornado import gen | |
from tornado.options import define, options, parse_command_line | |
define("port", default=8888, help="run on the given port", type=int) |