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: batch/v1beta1 | |
kind: CronJob # Tell kuber' that this is a cronjob | |
metadata: | |
annotations: | |
name: ecr-cred-helper # Name of the job ,can be anything | |
namespace: default | |
spec: | |
concurrencyPolicy: Allow | |
failedJobsHistoryLimit: 1 | |
jobTemplate: |
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
# NOTE: The service account `default:default` already exists in k8s cluster. | |
# You can create a new account following like this: | |
#--- | |
#apiVersion: v1 | |
#kind: ServiceAccount | |
#metadata: | |
# name: <new-account-name> | |
# namespace: <namespace> | |
--- |
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: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
annotations: | |
name: ecr-cred-helper | |
namespace: default | |
spec: | |
concurrencyPolicy: Allow | |
failedJobsHistoryLimit: 1 | |
jobTemplate: |
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
curl -k -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \ | |
-X PUT \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "containers": [{ "image": "'${IMAGE}'", "name": "'${NAME}'" }], "imagePullSecrets": [{ "name": "'${REGISTRY_SECRET}'", "type": "/v3/project/schemas/localObjectReference" }], "name": "'${NAME}'", "namespaceId": "'${NAMESPACE}'", "projectId": "'${PROJECT_ID}'", "scale": "'${SCALE}'", "workloadLabels": { "workload.user.cattle.io/workloadselector": "'${WORKLOAD_SELCTER}'" } }' \ | |
'https://my-rancher-server-url/v3/project/'${PROJECT_ID}'/workloads/deployment:'${NAMESPACE}':'${NAME} |
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
FROM golang:1.10 AS builder | |
# Download and install the latest release of dep | |
ADD https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 /usr/bin/dep | |
RUN chmod +x /usr/bin/dep | |
# Copy the code from the host and compile it | |
WORKDIR /go/src/mygolangcode | |
COPY Gopkg.toml Gopkg.lock ./ | |
RUN dep ensure --vendor-only |
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
{ | |
name: 'Kate Monster', | |
ssn: '123-456-7890', | |
contacts: [ | |
{number : "+1990112112", type : Mobile, title: 'my home1' }, | |
{number : "+230112112", type : LandLine, title: 'my office' } | |
] | |
} |
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
//Primary Collection | |
[ | |
{ | |
id: ObjectID('AAAA'), | |
partno: '123-aff-456', | |
parentCatalogNo: 1234, | |
name: '#4 grommet', | |
price: 3.99 | |
}, | |
{ |
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
db.products.findOne() | |
{ | |
name : 'left-handed smoke shifter', | |
manufacturer : 'Acme Corp', | |
catalog_number: 1234, | |
parts : [ | |
{ id : ObjectID('AAAA'), name : '#4 grommet' }, // Part name is denormalised | |
{ id: ObjectID('F17C'), name : 'fan blade assembly' }, | |
{ id: ObjectID('D2AA'), name : 'power switch' }, | |
// etc |
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
{ _id: ObjectId(), a: 1, b: "ab" } | |
{ _id: ObjectId(), a: 1, b: "cd" } | |
{ _id: ObjectId(), a: 1, b: "ef" } | |
{ _id: ObjectId(), a: 2, b: "jk" } | |
{ _id: ObjectId(), a: 2, b: "lm" } | |
{ _id: ObjectId(), a: 2, b: "no" } | |
{ _id: ObjectId(), a: 3, b: "pq" } | |
{ _id: ObjectId(), a: 3, b: "rs" } | |
{ _id: ObjectId(), a: 3, b: "tv" } |
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
{ _id: ObjectId(), a: 1, b: "ab" } | |
{ _id: ObjectId(), a: 2, b: "cd" } | |
{ _id: ObjectId(), a: 3, b: "ef" } | |
{ _id: ObjectId(), a: 4, b: "jk" } | |
{ _id: ObjectId(), a: 5, b: "lm" } | |
{ _id: ObjectId(), a: 6, b: "no" } | |
{ _id: ObjectId(), a: 7, b: "pq" } | |
{ _id: ObjectId(), a: 8, b: "rs" } | |
{ _id: ObjectId(), a: 9, b: "tv" } |
OlderNewer