Skip to content

Instantly share code, notes, and snippets.

View parj's full-sized avatar
💭
I may be slow to respond.

Parjanya Mudunuri parj

💭
I may be slow to respond.
View GitHub Profile
@parj
parj / ingress.yaml
Created May 15, 2020 18:34
Kibana ingress configuration on local kubernetes cluster
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: kibana-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /$1
#!/bin/bash
# define our new port number
API_PORT=8080
# update kube-apiserver args with the new port
# tell other services about the new port
sudo find /var/snap/microk8s/current/args -type f -exec sed -i "s/8080/$API_PORT/g" {} ';'
# create new, updated copies of our kubeconfig for kubelet and kubectl to use
mkdir -p ~/.kube && microk8s.config -l | sed "s/:8080/:$API_PORT/" | sudo tee /var/snap/microk8s/current/kubelet.config > ~/.kube/microk8s.config
@parj
parj / samplespringbootapp.jsonnet
Created October 26, 2019 05:28
Sample boot jsonnet
local sampleSpringBootAppDeployment = import "samplespringbootapp-deployment.jsonnet.template";
sampleSpringBootAppDeployment.samplespringbootapp()
local serviceDeployment = import "service-deployment-ingress.jsonnet.template";
local samplespringbootapp() = serviceDeployment + {
serviceName:: "samplespringbootapp",
dockerImage:: "parjanya/samplespringbootapp:1.6-SNAPSHOT",
servicePort:: 9999,
url:: "/hello",
readinessProbe::
{
@parj
parj / service-deployment-ingress.jsonnet.template
Created October 26, 2019 05:24
Jsonnet template for Kubernetes
// Template for a basic service, deployment and ingress
{
// Required arguments for this template
serviceName:: error "serviceName must be specified",
dockerImage:: error "dockerImage must be specified",
servicePort:: error "servicePort must be specified",
servicePortType:: "ClusterIP",
namespace:: "default",
host:: "mysterious-grass-savages.github",
@parj
parj / travis.yml
Created May 19, 2019 11:20
TravisCI
language: java
jdk:
- openjdk8
- openjdk11
- openjdk12
cache:
directories:
- ".autoconf"
- "$HOME/.m2"
@parj
parj / build.sh
Last active May 19, 2019 11:12
Multi CI - Travis CI and Circle CI
#!/bin/bash
# Stop on error
set -e
main() {
init
setup_git
buildArtifact
}
@parj
parj / importKeys.sh
Created May 19, 2019 10:56
Decrypting gpg private key and importing gpg
#!/bin/bash
# Stop on error
set -e
main() {
decryptAndImportPrivateKeys
}
# From gist - https://gist.github.com/Bost/54291d824149f0c4157b40329fceb02c
@parj
parj / settings.xml
Created May 19, 2019 10:53
Maven settings.xml
<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<servers>
<server>
<id>ossrh</id>
<username>${env.username}</username>
<password>${env.OSS_PASSWORD}</password>
</server>
@parj
parj / config.yml
Created May 19, 2019 10:50
CircleCI continuous CI job
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:11-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4