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
| func getDailyCost(dependency Dependency) (map[time.Time]float64, error) { | |
| currentTime := time.Now().Local() | |
| start := currentTime.AddDate(0, 0, -7).Format("2006-01-02") | |
| end := currentTime.Format("2006-01-02") | |
| layoutISO := "2006-01-02" | |
| datapoints := make(map[time.Time]float64, 0) | |
| filter := costexplorer.Expression{} |
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] | |
| ; general configuration: default endpoint | |
| endpoint=ovh-eu | |
| [ovh-eu] | |
| ; configuration specific to 'ovh-eu' endpoint | |
| application_key=my_app_key | |
| application_secret=my_application_secret | |
| consumer_key=my_consumer_key |
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
| kubectl apply -f deployment.yml |
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
| gcloud container clusters get-credentials CLUSTER_NAME --region REGION |
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
| docker login REGISTRY_URL -u USER -p PASSWORD | |
| kubectl create secret generic nexus \ | |
| --from-file=.dockerconfigjson=/home/$USER/.docker/config.json \ | |
| --type=kubernetes.io/dockerconfigjson |
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: v1 | |
| kind: Service | |
| metadata: | |
| name: app | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 3000 | |
| selector: | |
| app: app |
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: app | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: app | |
| 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
| - id: 'configure kubectl' | |
| name: 'gcr.io/cloud-builders/gcloud' | |
| env: | |
| - 'CLOUDSDK_COMPUTE_ZONE=${_CLOUDSDK_COMPUTE_ZONE}' | |
| - 'CLOUDSDK_CONTAINER_CLUSTER=${_CLOUDSDK_CONTAINER_CLUSTER}' | |
| - 'KUBECONFIG=/kube/config' | |
| entrypoint: 'sh' | |
| args: | |
| - '-c' | |
| - | |
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 "google_container_cluster" "cluster" { | |
| name = "${var.environment}" | |
| location = "${var.zone}" | |
| remove_default_node_pool = true | |
| initial_node_count = "${var.k8s_nodes}" | |
| master_auth { | |
| username = "" |
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: 'run quality test' | |
| name: "golangci/golangci-lint" | |
| args: ["golangci-lint","run"] | |
| - id: 'run unit test' | |
| name: 'gcr.io/cloud-builders/go' | |
| args: ['test', 'app'] | |
| env: ['GOPATH=.'] |
NewerOlder