calendarops-api

by makeacalendar

Helm chartv0.1.0App 0.1.0MITVerified publisher

REST API and browser preview for date-only calendars, business schedules, fiscal periods, and exports.

About this chart

CalendarOps API

CalendarOps API runs a self-hosted Go REST service and its browser preview. The calculation package models Gregorian civil dates as year/month/day triples. It does not convert date-only values through a local time zone. The same core code is used by the exporter image.

The service provides deterministic month grids (Monday or Sunday first), annual month geometry, US federal holiday dates, business-day counts with independently configurable endpoint inclusion, retail fiscal periods (4-4-5, 4-5-4, 5-4-4), monthly SVG, and date-only ICS holiday exports. The dashboard lets an operator choose a month, switch week start, inspect the output, calculate a business-day range, and view 4-4-5 periods.

Install

helm install calendar-api ./charts/calendarops-api --namespace calendarops --create-namespace
kubectl -n calendarops port-forward svc/calendar-api-calendarops-api 8080:8080

Open http://localhost:8080. For now, install from a local checkout. Public chart repository distribution is not yet verified.

API examples

curl http://localhost:8080/v1/calendar/month/2027/1?weekStart=monday
curl http://localhost:8080/v1/calendar/year/2027
curl http://localhost:8080/v1/holidays/us/2027
curl 'http://localhost:8080/v1/business-days?start=2027-01-01&end=2027-01-31&includeStart=false&includeEnd=true'
curl 'http://localhost:8080/v1/fiscal/445?year=2027'
curl -o january.svg http://localhost:8080/v1/exports/month.svg/2027/1
curl -o holidays.ics 'http://localhost:8080/v1/exports/holidays.ics?year=2027'

Errors return JSON {"error":"..."} with HTTP 400 for invalid inputs. /healthz, /readyz, and /metrics are available. Prometheus metrics count requests and exports with bounded labels; structured JSON logs omit query strings.

Configuration

ValueDefaultMeaning
replicaCount1Deployment replicas when HPA is disabled
image.repositoryghcr.io/makeacalendar/make-a-calendar-calendaropsShared API/CLI image
image.tag0.1.0Application image version
image.digestemptyOptional immutable image digest; takes precedence over tag
calendar.defaultYear2027Preview default
calendar.weekStartmondayDefault grid policy
ingress.enabledfalseCreate a networking.k8s.io/v1 Ingress
autoscaling.enabledfalseCreate an autoscaling/v2 CPU HPA
networkPolicy.enabledfalseCreate a policy; configure networkPolicy.ingress for allowed clients
serviceMonitor.enabledfalseCreate a Prometheus Operator ServiceMonitor

The API does not call Kubernetes, cloud, or calendar vendor APIs and needs no RBAC. The chart disables service-account token mounting and uses a non-root UID, read-only root filesystem, no privilege escalation, dropped capabilities, and RuntimeDefault seccomp. Requests and limits are set. Optional ServiceMonitor needs the Prometheus Operator CRD. Optional NetworkPolicy requires an enforcing cluster network plugin; its rules must permit intended ingress.

Date and coverage limits

Dates use the proleptic Gregorian calendar. The API has no PDF conversion or external data dependency. Holiday results currently apply the modern US federal holiday set; historical statutory changes before the current set are not modeled. Payroll logic reports nominal and weekend/holiday-adjusted dates only; it does not calculate wages, withholding, tax, or benefits. See the OpenAPI file and date engine.

For complementary browser-based printable month calendars and date calculators, visit Make a Calendar, including its monthly calendars, date tools, and converters. CalendarOps is an independent project; it does not scrape or depend on the site.

Deploy calendarops-api with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has calendarops-api on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcalendarops-api is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply