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
job "redis-server" { | |
datacenters = ["gcp-test"] | |
group "redis" { | |
count = 2 | |
network { | |
port "db" { to = 6379 } | |
} |
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
--- | |
steps: | |
- id: 'Lint Dockerfile' | |
name: 'ghcr.io/hadolint/hadolint' | |
entrypoint: '/bin/hadolint' | |
args: ['cloud-run/Dockerfile'] | |
- id: 'Build container image' | |
name: 'gcr.io/cloud-builders/docker' | |
args: ['build', '-t', '${_GAR_REGION}-docker.pkg.dev/${PROJECT_ID}/${_GAR_REPO_NAME}/vault-server:${COMMIT_SHA}', '-f', 'cloud-run/Dockerfile', '.'] | |
- id: 'Image efficiency scan' |
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
#! /usr/bin/env python3 | |
import tensorflow as tf | |
import tensorflow_datasets as tfds | |
(ds_train, ds_test), ds_info = tfds.load( | |
'mnist', | |
split=['train', 'test'], | |
shuffle_files=True, |
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
#!/bin/bash | |
export VAULT_ADDR='http://127.0.0.1:8100' | |
TOKEN_FILE_DIR='/path/to/dir' | |
TOKEN_FILENAME='vault-token-via-agent' | |
AUTOAUTH_TOKEN=$(find ${TOKEN_FILE_DIR} -type f -name ${TOKEN_FILENAME} -exec cat {} +) | |
ROLE_ID=$(VAULT_TOKEN=${AUTOAUTH_TOKEN} vault read -field=role_id auth/medium/role/jenkins/role-id) |
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
vault { | |
address = "https://10.234.56.78:8200" | |
retry { | |
num_retries = 3 | |
} | |
} | |
auto_auth { | |
method "gcp" { | |
mount_path = "auth/my-project-123" |
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
resource "//cloudresourcemanager.googleapis.com/projects/my-project-123" { | |
roles = [ | |
"roles/compute.instanceAdmin.v1", | |
"roles/compute.networkAdmin", | |
"roles/compute.securityAdmin", | |
"roles/iam.serviceAccountUser", | |
] | |
} |
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: HTTPRoute | |
apiVersion: gateway.networking.k8s.io/v1alpha2 | |
metadata: | |
name: store | |
namespace: store-ns | |
spec: | |
parentRefs: | |
- kind: Gateway | |
name: external-http |
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: store-v1 | |
namespace: store-ns | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
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: Gateway | |
apiVersion: gateway.networking.k8s.io/v1alpha2 | |
metadata: | |
name: external-http | |
namespace: infra-ns | |
spec: | |
gatewayClassName: gke-l7-gxlb | |
listeners: | |
- name: http |
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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: gxlb-ingress | |
namespace: default | |
annotations: | |
kubernetes.io/ingress.class: "gce" | |
kubernetes.io/ingress.allow-http: "true" | |
spec: |