Skip to content

davidumea/timestamper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timestamper

Argo CD application that deploys a pod that does some read/write operations towards a PostgreSQL cluster.

Image

Build and push the image to your registry

CR_DOMAIN=             # Container registry domain
CR_PROJECT=            # Container registry project
IMAGE_TAG=             # Image tag
DOCKER_USER=           # User for container registry
DOCKER_PASSWORD=       # Password for container registry

cd image/
docker build -t $CR_DOMAIN/$CR_PROJECT/timestamper:$IMAGE_TAG .
docker push $CR_DOMAIN/$CR_PROJECT/timestamper:$IMAGE_TAG

Configure image pull secret

kubectl create secret docker-registry pull-secret \
    --docker-server=$CR_DOMAIN \
    --docker-username=$DOCKER_USER \
    --docker-password=$DOCKER_PASSWORD

kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "pull-secret"}]}'

Postgres

Prepare postgres

CREATE DATABASE timestamper;
GRANT ALL ON DATABASE timestamper TO "PGUSER";
\c timestamper
CREATE TABLE timestamp (id BIGSERIAL NOT NULL PRIMARY KEY, timestamp TIMESTAMP NOT NULL);
GRANT ALL ON TABLE timestamp TO "PGUSER";
GRANT ALL ON TABLE timestamp_id_seq to "PGUSER";

Application

Modify values in the application manifest when deploying your application, as they are required for everything to run successfully.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors