This file contains hidden or 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 shared library */ | |
| @Library('jenkins-shared-library')_ | |
| pipeline { | |
| agent any | |
| options { | |
| buildDiscarder(logRotator(numToKeepStr: '3')) | |
| } |
This file contains hidden or 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
| # Default values for openvpn. | |
| # This is a YAML-formatted file. | |
| # Declare variables to be passed into your templates. | |
| replicaCount: 1 | |
| image: | |
| repository: jfelten/openvpn-docker | |
| tag: 1.1.0 | |
| pullPolicy: IfNotPresent | |
| service: | |
| name: openvpn |
This file contains hidden or 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
| kind: PersistentVolumeClaim | |
| apiVersion: v1 | |
| metadata: | |
| name: openvpn-data-claim | |
| namespace: openvpn | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: |
This file contains hidden or 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
| # execute each line separately | |
| POD_NAME=$(kubectl get pods --namespace openvpn -l type=openvpn -o jsonpath='{ .items[0].metadata.name }') | |
| SERVICE_NAME=$(kubectl get svc --namespace openvpn -l type=openvpn -o jsonpath='{ .items[0].metadata.name }') | |
| SERVICE_IP=$(kubectl get svc --namespace openvpn $SERVICE_NAME -o go-template='{{ range $k, $v := (index .status.loadBalancer.ingress 0)}}{{ $v }}{{end}}') | |
| KEY_NAME=kubeVPN | |
| kubectl --namespace openvpn exec -it $POD_NAME /etc/openvpn/setup/newClientCert.sh $KEY_NAME $SERVICE_IP | |
| kubectl --namespace openvpn exec -it $POD_NAME cat /etc/openvpn/certs/pki/$KEY_NAME.ovpn > $KEY_NAME.ovpn |
This file contains hidden or 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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: my-app | |
| spec: | |
| selector: | |
| matchLabels: | |
| run: my-app | |
| replicas: 2 | |
| template: |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:ListRoles", | |
| "sts:AssumeRole" | |
| ], | |
| "Resource": "*" |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:PutObject" | |
| ], | |
| "Resource": "arn:aws:s3:::demo-lvthillo-bucket/*" | |
| } |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": { | |
| "Effect": "Allow", | |
| "Principal": { "AWS": "arn:aws:iam::123456789012:root" }, | |
| "Action": "sts:AssumeRole" | |
| } | |
| } |
This file contains hidden or 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
| Parameters: | |
| VPCCidr: | |
| AllowedPattern: '((\d{1,3})\.){3}\d{1,3}/\d{1,2}' | |
| Type: String | |
| Default: 10.0.0.0/16 | |
| Description: Enter the CIDR for your VPC | |
| ... | |
| Resources: | |
| VPC: | |
| Type: AWS::EC2::VPC |
This file contains hidden or 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
| Parameters: | |
| Region: | |
| Type: String | |
| Default: eu-west-1 | |
| AllowedValues: | |
| - eu-west-1 | |
| - eu-west-2 | |
| - eu-west-3 | |
| - eu-central-1 | |
| - us-west-2 |