diff --git a/.gitignore b/.gitignore index b27f105..19ace02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .env .swp -k8s/prod.secret.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml deleted file mode 100644 index 306161c..0000000 --- a/k8s/deployment.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: agendas-deployment - labels: - app: agendas -spec: - replicas: 1 - selector: - matchLabels: - app: agendas - template: - metadata: - labels: - app: agendas - spec: - containers: - - name: agendas - image: git.agecem.com/bottin/agendas:latest - command: ['agendas', '--config', '/etc/agendas/config.yaml'] - imagePullPolicy: Always - ports: - - containerPort: 3333 - volumeMounts: - - name: config-secret - mountPath: '/etc/agendas/' - readOnly: true - - name: localtime - mountPath: /etc/localtime - readOnly: true - volumes: - - name: config-secret - secret: - secretName: agendas-config-secret - items: - - key: config.yaml - path: config.yaml - - key: cert.pem - path: cert.pem - - key: key.pem - path: key.pem - - name: localtime - hostPath: - path: /etc/localtime - type: File diff --git a/k8s/example-secret.yaml b/k8s/example-secret.yaml deleted file mode 100644 index 06edeaf..0000000 --- a/k8s/example-secret.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: agendas-config-secret -type: Opaque -stringData: - config.yaml: | - Bottin: - Host: 'api.bottin.agecem.com' - Key: 'CHANGE_ME' - Port: 443 - TLS: - Enabled: true - SkipVerify: false - Credentials: - 'agendas': 'CHANGE_ME' - DB: - Database: 'agendas' - Host: 'db' - Password: 'CHANGE_ME' - Port: 5432 - SSLMode: 'prefer' - Username: 'agendas' - TLS: - Enabled: true - Cert: '/etc/agendas/cert.pem' - Key: '/etc/agendas/key.pem' - cert.pem: | - CHANGE_ME - key.pem: | - CHANGE_ME diff --git a/k8s/service.yaml b/k8s/service.yaml deleted file mode 100644 index 1b8bd17..0000000 --- a/k8s/service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: agendas-service -spec: - type: NodePort - selector: - app: agendas - ports: - - protocol: TCP - port: 3333 diff --git a/server.go b/server.go index b27a5de..a9a4117 100644 --- a/server.go +++ b/server.go @@ -5,7 +5,6 @@ import ( "crypto/subtle" "fmt" "log" - "net/http" "git.agecem.com/bottin/agendas/ui" "git.agecem.com/bottin/bottin/v10/pkg/bottin" @@ -64,7 +63,6 @@ func RunServer(ctx context.Context, cfg Config, bottinClient *bottin.APIClient, ) e.GET("/", UIIndex(ctx, bottinClient, dbClient)) - e.GET("/nothing/", func(c echo.Context) error { return c.NoContent(http.StatusOK) }) //e.GET("/transaction/", UIReadTransaction e.POST("/transaction/", UICreateTransaction(ctx, cfg, bottinClient, dbClient))