Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DevOps Cloud-native CI/CD GitOps with Tekton & ArgoCD.

NotificationsYou must be signed in to change notification settings

rogeriorocha/api-product-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps Cloud-native CI/CD GitOps with Tekton & ArgoCD.

write REST API sample ingolang.

⚡ Technologies

TektonArgoCD

  • Others

KubernetesDockerGolangMySQLGitHub

Requirements:

versions

Tekton Pipeline/Trigger/Dashboard

tkn versionClient version: 0.20.0Pipeline version: v0.27.3Triggers version: v0.16.0Dashboard version: v0.19.0

Kubernetes

kubectl version -o yamlclientVersion:  buildDate:"2021-04-08T16:31:21Z"  compiler: gc  gitCommit: cb303e613a121a29364f75cc67d3d580833a7479  gitTreeState: clean  gitVersion: v1.21.0  goVersion: go1.16.1  major:"1"  minor:"21"  platform: darwin/amd64serverVersion:  buildDate:"2021-08-17T02:06:07Z"  compiler: gc  gitCommit: 4966fd0dded6419fd23233a38c8905c67a3ea78e  gitTreeState: clean  gitVersion: v1.20.7  goVersion: go1.15.12  major:"1"  minor:"20"  platform: linux/amd64

ArgoCD / Rollout

argocd versionargocd: v2.0.5+4c94d88.dirty  BuildDate: 2021-07-23T05:12:02Z  GitCommit: 4c94d886f56bcb2f9d5b3251fdc049c2d1354b88  GitTreeState: dirty  GoVersion: go1.16.6  Compiler: gc  Platform: darwin/amd64argocd-server: v2.1.1+aab9542
kubectl argo rollouts version  kubectl-argo-rollouts: v1.0.4+c63b6c1  BuildDate: 2021-08-03T02:45:19Z  GitCommit: c63b6c1f5134a9f19caae37765f1a8a145f62d7d  GitTreeState: clean  GoVersion: go1.16.3  Compiler: gc  Platform: darwin/amd64

services

  • api REST;
  • mySql database.

Start Skaffold deploy

skaffold dev --port-forward  --trigger polling

methods

  • Set API_URL
API_URL="http://localhost:8080/api/v1/products"API_URL="http://localhost:8088/api/api/v1/products"

curl -H 'Host: prod.api.com' $API_URL

  • get ALL products
curl $API_URL
  • post add one product
curl  \    -H 'Host: prod.api.com' \    --include \    --header "Content-Type: application/json" \    --request "POST" \    --data '{"id": "1","name": "bike","value": 4009.99}' \    $API_URLcurl $API_URL \    --include \    --header "Content-Type: application/json" \    --request "POST" \    --data '{"id": "2","name": "ebook x","value": 5.00}'curl $API_URL \    --include \    --header "Content-Type: application/json" \    --request "POST" \    --data '{"id": "3","name": "Server z","value": 90000.00}'
  • get ONE product
curl $API_URL/1
  • put change ONE product
curl $API_URL/1 \    --include \    --header "Content-Type: application/json" \    --request "PUT" \    --data '{"value": 11500.99}'
  • delete ONE product
curl $API_URL/1 \    --include \    --header "Content-Type: application/json" \    --request "DELETE"

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp