Skip to content

Instantly share code, notes, and snippets.

@krx252525
krx252525 / disable-catalogue.js
Last active June 12, 2020 01:51
Disables Openshift Catalogue
(function() {
OPENSHIFT_CONSTANTS.DISABLE_SERVICE_CATALOG_LANDING_PAGE=true;
}());
@krx252525
krx252525 / initial-analysis-wrong
Last active May 23, 2018 02:44
Kubernetes node healthcheck via ELB with DNS change
Title: Kubernetes node health monitoring
# Render here: https://bramp.github.io/js-sequence-diagrams/
node->dns: resolve ip-address
node->node: cache ip ttl 60s
node->elb: healthy
master->node: ok (2xx)
node->node: wait 10s
note over node,elb: Repeat heartbeat every \n node-status-update-frequency (default 10s)
elb->master: healthy
note right of master: Check status of node every \nnode-monitor-period (default 5s)
@krx252525
krx252525 / KubeDNS
Created August 29, 2017 16:27
kubectl describe pods --namespace kube-system kube-dns-v19-2510715403-76tn3
Name: kube-dns-v19-2510715403-76tn3
Namespace: kube-system
Node: ip-xx-xx-xx-x.ec2.internal/xx.xx.xx.xx
Start Time: Mon, 14 Aug 2017 09:25:46 +0100
Labels: k8s-app=kube-dns
kubernetes.io/cluster-service=true
pod-template-hash=2510715403
version=v19
Status: Running
IP: 10.2.58.93
@krx252525
krx252525 / out.tfplan
Created July 31, 2017 14:46
Terraform Apply
~ module.hoolihan-k8s.k8s.aws_iam_role_policy.kube_master_iam_role_policy
policy: "{\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": \"ec2:Describe*\",\n \"Resource\": \"*\"\n },\n {\n \"Effect\": \"Allow\",\n \"Action\": \"autoscaling:Describe*\",\n \"Resource\": \"*\"\n },\n {\n \"Effect\": \"Allow\",\n \"Action\": \"ec2:*\",\n \"Resource\": \"*\"\n },\n {\n \"Effect\": \"Allow\",\n \"Action\": \"elasticloadbalancing:*\",\n \"Resource\": \"*\"\n },\n {\n \"Action\": \"ec2:AttachVolume\",\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n },\n {\n \"Action\": \"ec2:DetachVolume\",\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n },\n {\n \"Effect\": \"Allow\",\n \"Action\": \"kms:Decrypt\",\n \"Resource\": \"arn:aw
@krx252525
krx252525 / out.tfplan
Last active July 31, 2017 14:42
Terraform Plan
~ module.hoolihan-k8s.k8s.aws_autoscaling_group.kube_minion_asg_subnet.2
launch_configuration: "terraform-00e06ba237a19d190583af5f29" => "${aws_launch_configuration.kube_minion_launch_configuration.name}"
Name: kube-dns-v15-7lkws
Namespace: kube-system
Node: ip-xx-xx-xxx-xxx.ec2.internal/xx.xx.xxx.xxx
Start Time: Thu, 16 Feb 2017 00:59:46 +0000
Labels: k8s-app=kube-dns
kubernetes.io/cluster-service=true
version=v15
Status: Running
IP: xx.x.xx.x
Controllers: ReplicationController/kube-dns-v15
@krx252525
krx252525 / sample-spec.yaml
Created March 7, 2017 13:25
The simplest spec that recreates issue where Swagger codegen Java client uses String instead of URL
swagger: '2.0'
host: 'example.com'
basePath: /
schemes:
- https
################################################################################
# Info #
################################################################################
info:
version: '1.0.0'
@krx252525
krx252525 / Play2-Java-ApiImplicitParam
Last active April 27, 2016 13:31
Example of Play2 Java ApiImplicitParam with paramType set
// The paramType requires that dataType is also declared. This is not mentioned in the documentation
@ApiImplicitParams({
@ApiImplicitParam(name = "body", value = "Customers List", required = true, dataType = "string", paramType = "body")
})