{"id":15637037,"url":"https://github.com/cirocosta/pizza-controller","last_synced_at":"2025-06-24T18:37:38.303Z","repository":{"id":73883877,"uuid":"320087976","full_name":"cirocosta/pizza-controller","owner":"cirocosta","description":"That's right - order that nice pizza 🍕 with `kubectl`","archived":false,"fork":false,"pushed_at":"2020-12-10T23:17:55.000Z","size":49,"stargazers_count":115,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T16:50:55.244Z","etag":null,"topics":["controller","controller-runtime","crd","kubernetes"],"latest_commit_sha":null,"homepage":"https://ops.tips/notes/kubernetes-pizza/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cirocosta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-09T21:49:15.000Z","updated_at":"2025-04-14T11:47:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ea9c9ca-a90c-486b-aa90-12839259579c","html_url":"https://github.com/cirocosta/pizza-controller","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"57815e431eb68c82077664e6b40dc92124f7d57e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cirocosta/pizza-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fpizza-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fpizza-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fpizza-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fpizza-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cirocosta","download_url":"https://codeload.github.com/cirocosta/pizza-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fpizza-controller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261735042,"owners_count":23201945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["controller","controller-runtime","crd","kubernetes"],"created_at":"2024-10-03T11:09:42.348Z","updated_at":"2025-06-24T18:37:38.275Z","avatar_url":"https://github.com/cirocosta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pizza-controller\n\nmaking kubernetes do what it was _always_ meant to do: order pizza.\n\n- https://gum.co/kubernetes-crds to get up to speed with custom resources and controllers\n- [docs](./docs) for CRD reference\n\n\n## usage\n\nFirst, create a secret with the credit card information (_yeah, this is fine,\ntrust me_) to be used during payment:\n\n```yaml\nkind: Secret\napiVersion: v1\nmetadata:\n  name: credit-card\nstringData:\n  number: 123343132314232\n  expiration: 12/02\n  securityCode: 123\n  zip: m5d0l2\n```\n\nthen, create a `PizzaCustomer`, the representation of _you_, the customer:\n\n\n```yaml\nkind: PizzaCustomer\napiVersion: ops.tips/v1alpha1\nmetadata:\n  name: you\nspec:\n  firstName: barack\n  lastName: obama\n  email: obama@gov.gov\n  phone: \"31241323\"\n  streetNumber: \"20\"\n  streetName: King St\n  city: Toronto\n  state: \"ON\"\n  zip: m5lz8j\n``` \n\nWith the `PizzaCustomer` object created, we can see what's the closest store available\nfor it:\n\n\n```console\n$ kubectl get pizzacustomer\nNAME              CLOSEST\nyou               store-123\n```\n\nLooking at the PizzaStore object, we can check out its menu:\n\n```console\n$ kubectl get pizzastore store-123 -o yaml\nkind: PizzaStore\nmetadata:\n  name: store-123\nspec:\n  address: |\n    51 Niagara St\n    Toronto, ON M5V1C3\n  id: \"10391\"\n  phone: 416-364-3939\n  products:\n    - description: Unique Lymon (lemon-lime) flavor, clear, clean and crisp with no caffeine.\n      id: 2LSPRITE\n      name: Sprite\n      size: 2 Litre\n```\n\nKnowing what's available to us, we can place the order:\n\n```yaml\nkind: PizzaOrder\napiVersion: ops.tips/v1\nmetadata:\n  name: ma-pizza\nspec:\n  yeahSurePlaceThisOrder: true  # otherwise, it'll just calculate the price\n  storeRef: {name: store-123}\n  customerRef: {name: you}\n  payment:\n    creditCardSecretRef: {name: cc}\n  items:\n    - ticker: 10SCREEN\n      quantity: 1\n```\n\nTo keep track of what's going on with your pizza, check out the order's status:\n\n```console\n$ kubectl get pizzaorder ma-pizza\nNAME    PRICE      ID                     CONDITION     AGE\norder   9.030000   Wlz6HcE6BPlfQNlxDAXa   OrderPlaced   68m\n```\n\n\n## what's next?\n\nare you _really_ into ordering pizza using `kubectl`?\n\nlike, really? are you sure?\n\nhere's what's missing:\n\n- well, any .. tests :horse:\n- order tracking (it's `xml`-based - SOAP stuff)\n- being more flexible with non-canadian folks (it's currently hardcoded for\n  Canada, but could easily be changed)\n\nat the moment I got my pizza .. development finished :sweat_smile: maybe you'll\ncarry it forward?\n\n\n## Installation\n\n1. apply the manifest\n\n```\ngit clone https://github.com/cirocosta/pizza-controller\ncd pizza-controller\n\n# using `kapp` - recommended :)\n#\nkapp deploy -a pizza-controller -f ./config/release.yaml\n\n\n# OR .. plain old kubectl\n#\nkubectl apply -f ./config/release.yaml\n```\n\n## thanks\n\nThe API part was _heavily_ inspired by these two projects:\n\n- https://github.com/ggrammar/pizzapi\n- https://github.com/harrybrwn/apizza\n\nThank you!\n\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Fpizza-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirocosta%2Fpizza-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Fpizza-controller/lists"}