├── .github
├── ISSUE_TEMPLATE
│ └── bug_report.md
├── auto_assign.yml
└── workflows
│ ├── cache.yml
│ ├── integration-test.yml
│ ├── main-charts.yml
│ ├── main-docker.yml
│ ├── main-docs.yml
│ ├── main-proto.yml
│ ├── main-slack.yml
│ ├── pr-close-docs.yml
│ ├── pr-update-docs.yml
│ ├── semantic-tags.yml
│ ├── stale.yml
│ └── test.yml
├── .gitignore
├── .golangci.yml
├── .mockery.yaml
├── .mockery_uncommitted.yaml
├── .vscode
└── settings.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── build
└── package
│ ├── Dockerfile
│ ├── Dockerfile.dockerignore
│ ├── Dockerfile.local
│ ├── docs
│ ├── Dockerfile
│ ├── Dockerfile.dockerignore
│ └── nginx.conf
│ ├── goreleaser
│ ├── Dockerfile
│ ├── goreleaser.yml
│ ├── rig-proxy.Dockerfile
│ └── rig.Dockerfile
│ ├── proxy
│ ├── Dockerfile
│ ├── Dockerfile.dockerignore
│ └── Dockerfile.local
│ └── rig
│ ├── Dockerfile
│ └── Dockerfile.dockerignore
├── cmd
├── common
│ ├── cdmexec.go
│ ├── cli_group_ids.go
│ ├── completion.go
│ ├── flags.go
│ ├── format.go
│ ├── git.go
│ ├── notifier.go
│ ├── pipeline.go
│ ├── prompt.go
│ ├── prompt
│ │ ├── prompt.go
│ │ └── validate.go
│ ├── setup.go
│ ├── tview_yaml.go
│ ├── tview_yaml_test.go
│ ├── useridentifier.go
│ ├── utils.go
│ └── utils_test.go
├── rig-operator
│ ├── apichecker
│ │ └── apichecker.go
│ ├── certgen
│ │ ├── certgen.go
│ │ ├── create.go
│ │ ├── k8s.go
│ │ └── patch.go
│ ├── log
│ │ └── log.go
│ ├── main.go
│ └── plugin.go
├── rig-ops
│ ├── cmd
│ │ ├── base
│ │ │ ├── flags.go
│ │ │ ├── operator_client.go
│ │ │ └── register.go
│ │ ├── migrate
│ │ │ ├── capsule_name.go
│ │ │ ├── current_resources.go
│ │ │ ├── export.go
│ │ │ ├── helm.go
│ │ │ ├── migrate.go
│ │ │ ├── plugins.go
│ │ │ ├── reporting.go
│ │ │ ├── setup.go
│ │ │ └── warning.go
│ │ ├── plugins
│ │ │ ├── check.go
│ │ │ ├── computeConfig.go
│ │ │ ├── dryrun.go
│ │ │ ├── list.go
│ │ │ └── setup.go
│ │ └── root.go
│ └── main.go
├── rig-proto-gen
│ └── main.go
├── rig-proxy
│ ├── main.go
│ ├── root.go
│ └── tunnel
│ │ └── tunnel.go
└── rig
│ ├── cmd
│ ├── activity
│ │ └── setup.go
│ ├── auth
│ │ ├── activate_service_account.go
│ │ ├── get.go
│ │ ├── login.go
│ │ └── setup.go
│ ├── capsule
│ │ ├── common.go
│ │ ├── deploy
│ │ │ ├── deploy.go
│ │ │ ├── deploy_set.go
│ │ │ ├── deploy_test.go
│ │ │ └── setup.go
│ │ ├── dry_run.go
│ │ ├── image
│ │ │ ├── common.go
│ │ │ ├── create_image.go
│ │ │ ├── list.go
│ │ │ └── setup.go
│ │ ├── instance
│ │ │ ├── exec.go
│ │ │ ├── get.go
│ │ │ ├── list.go
│ │ │ ├── logs.go
│ │ │ ├── monitor_size.go
│ │ │ ├── monitor_size_windows.go
│ │ │ ├── restart.go
│ │ │ ├── setup.go
│ │ │ └── tty.go
│ │ ├── jobs
│ │ │ ├── add.go
│ │ │ ├── executions.go
│ │ │ ├── list.go
│ │ │ └── setup.go
│ │ ├── pipeline
│ │ │ ├── abort.go
│ │ │ ├── get.go
│ │ │ ├── list.go
│ │ │ ├── promote.go
│ │ │ ├── setup.go
│ │ │ └── start.go
│ │ ├── rollout
│ │ │ ├── list.go
│ │ │ ├── rollback.go
│ │ │ └── setup.go
│ │ ├── root
│ │ │ ├── create.go
│ │ │ ├── delete.go
│ │ │ ├── get.go
│ │ │ ├── list.go
│ │ │ ├── list_proposals.go
│ │ │ ├── logs.go
│ │ │ ├── port-forward.go
│ │ │ ├── promote.go
│ │ │ ├── setup.go
│ │ │ ├── status.go
│ │ │ ├── status_utils.go
│ │ │ ├── stop.go
│ │ │ └── update.go
│ │ └── scale
│ │ │ ├── get.go
│ │ │ ├── horizontal.go
│ │ │ ├── horizontal_test.go
│ │ │ ├── setup.go
│ │ │ └── vertical.go
│ ├── cluster
│ │ ├── getconfig.go
│ │ ├── list.go
│ │ └── setup.go
│ ├── cmdconfig
│ │ ├── config.go
│ │ └── context.go
│ ├── completions
│ │ └── completions.go
│ ├── config
│ │ ├── current_context.go
│ │ ├── delete.go
│ │ ├── edit.go
│ │ ├── init.go
│ │ ├── list_contexts.go
│ │ ├── setup.go
│ │ ├── use_context.go
│ │ ├── use_environment.go
│ │ ├── use_project.go
│ │ └── view_config.go
│ ├── dev
│ │ ├── host.go
│ │ ├── host_tunnel.go
│ │ ├── kind
│ │ │ ├── config.yaml
│ │ │ ├── create.go
│ │ │ ├── registry.yaml
│ │ │ └── setup.go
│ │ ├── remote.go
│ │ └── setup.go
│ ├── environment
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── list.go
│ │ ├── listnamespaces.go
│ │ ├── remove_project.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── flags
│ │ └── flags.go
│ ├── git
│ │ ├── setup.go
│ │ └── status.go
│ ├── group
│ │ ├── add_member.go
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── list.go
│ │ ├── list_groups_for_member.go
│ │ ├── list_members.go
│ │ ├── remove_member.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── issue
│ │ └── setup.go
│ ├── noop
│ │ └── setup.go
│ ├── project
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── list.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── role
│ │ ├── assign.go
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── get.go
│ │ ├── list.go
│ │ ├── list_for_group.go
│ │ ├── list_for_role.go
│ │ ├── revoke.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── root.go
│ ├── serviceaccount
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── list.go
│ │ └── setup.go
│ ├── settings
│ │ ├── configuration.go
│ │ ├── get.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── testing
│ │ └── some_test.go
│ └── user
│ │ ├── create.go
│ │ ├── delete.go
│ │ ├── get.go
│ │ ├── list.go
│ │ ├── list_sessions.go
│ │ ├── setup.go
│ │ └── update.go
│ ├── main.go
│ └── services
│ └── auth
│ └── service.go
├── configs
└── rig-operator-config.yaml
├── deploy
├── charts
│ ├── rig-operator
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ │ ├── _config.tpl
│ │ │ ├── _helpers.tpl
│ │ │ ├── apicheck
│ │ │ │ ├── job.yaml
│ │ │ │ ├── rbac.yaml
│ │ │ │ └── serviceaccount.yaml
│ │ │ ├── certgen
│ │ │ │ ├── create-job.yaml
│ │ │ │ ├── patch-job.yaml
│ │ │ │ ├── rbac.yaml
│ │ │ │ └── serviceaccount.yaml
│ │ │ ├── certificate.yaml
│ │ │ ├── clusterrole.yaml
│ │ │ ├── clusterrole_platform.yaml
│ │ │ ├── clusterrolebinding.yaml
│ │ │ ├── clusterrolebinding_platform.yaml
│ │ │ ├── crd.yaml
│ │ │ ├── deployment.yaml
│ │ │ ├── role.yaml
│ │ │ ├── rolebinding.yaml
│ │ │ ├── secret.yaml
│ │ │ ├── secret_platform.yaml
│ │ │ ├── service.yaml
│ │ │ ├── serviceaccount.yaml
│ │ │ ├── serviceaccount_platform.yaml
│ │ │ ├── servicemonitor.yaml
│ │ │ └── webhookconfiguration.yaml
│ │ └── values.yaml
│ └── rig-platform
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _config.tpl
│ │ ├── _helpers.tpl
│ │ ├── capsule.yaml
│ │ ├── clusterrole.yaml
│ │ ├── clusterrolebinding.yaml
│ │ ├── configmap.yaml
│ │ ├── postgres
│ │ │ ├── secret.yaml
│ │ │ ├── service.yaml
│ │ │ └── statefulset.yaml
│ │ ├── secret.yaml
│ │ ├── service.yaml
│ │ ├── serviceaccount.yaml
│ │ └── tests
│ │ │ └── test-connection.yaml
│ │ └── values.yaml
└── kind
│ └── create.sh
├── docs
├── .env
├── .gitignore
├── README.md
├── api-ref-docs
│ └── templates
│ │ └── service.tmpl
├── babel.config.js
├── crd-ref-docs
│ ├── config.yaml
│ ├── platform.yaml
│ ├── templates
│ │ ├── gv_details.tpl
│ │ ├── gv_list.tpl
│ │ ├── type.tpl
│ │ └── type_members.tpl
│ └── v1alpha2-config.yaml
├── docs
│ ├── additional-links.mdx
│ ├── api.mdx
│ ├── api
│ │ ├── config
│ │ │ └── v1alpha1.md
│ │ ├── platform-api.md
│ │ ├── platformv1.md
│ │ ├── v1alpha1.md
│ │ └── v1alpha2.md
│ ├── cluster.mdx
│ ├── cluster
│ │ ├── access-admin-cli.mdx
│ │ └── manage-admin-users.mdx
│ ├── configuration.mdx
│ ├── homepage.mdx
│ ├── operator-manual
│ │ ├── capsule-spec.mdx
│ │ ├── ci-cd.mdx
│ │ ├── cli.mdx
│ │ ├── crd-operator.mdx
│ │ ├── environments.mdx
│ │ ├── gitops.mdx
│ │ ├── migration.mdx
│ │ ├── plugins
│ │ │ ├── builtin.mdx
│ │ │ ├── builtin
│ │ │ │ ├── annotations.mdx
│ │ │ │ ├── argo_rollout.mdx
│ │ │ │ ├── datadog.mdx
│ │ │ │ ├── env_mapping.mdx
│ │ │ │ ├── envvar_csi.mdx
│ │ │ │ ├── google_cloud_sql_auth_proxy.mdx
│ │ │ │ ├── init_container.mdx
│ │ │ │ ├── object_create.mdx
│ │ │ │ ├── object_template.mdx
│ │ │ │ ├── placement.mdx
│ │ │ │ ├── sidecar.mdx
│ │ │ │ └── statefulset.mdx
│ │ │ ├── capsulesteps.mdx
│ │ │ ├── capsulesteps
│ │ │ │ ├── cron_jobs.mdx
│ │ │ │ ├── deployment.mdx
│ │ │ │ ├── ingress_routes.mdx
│ │ │ │ ├── service_account.mdx
│ │ │ │ ├── service_monitor.mdx
│ │ │ │ └── vpa.mdx
│ │ │ ├── examples.mdx
│ │ │ ├── plugins.mdx
│ │ │ └── thirdparty.mdx
│ │ ├── review.mdx
│ │ ├── setup-guide.mdx
│ │ └── setup-guide
│ │ │ ├── operator.mdx
│ │ │ ├── operator
│ │ │ ├── autoscaler.mdx
│ │ │ ├── configuration-secrets.mdx
│ │ │ ├── networking.mdx
│ │ │ └── plugins.mdx
│ │ │ ├── platform.mdx
│ │ │ └── platform
│ │ │ ├── container-registries.mdx
│ │ │ ├── database.mdx
│ │ │ ├── multicluster.mdx
│ │ │ ├── network.mdx
│ │ │ ├── notifications.mdx
│ │ │ └── sso.mdx
│ ├── overview
│ │ ├── architecture.mdx
│ │ ├── guides.mdx
│ │ └── guides
│ │ │ ├── argocd.mdx
│ │ │ ├── aws.mdx
│ │ │ ├── ci-cd.mdx
│ │ │ ├── customising-podspecs.mdx
│ │ │ ├── declarative-deployment.mdx
│ │ │ ├── getting-started.mdx
│ │ │ ├── helm.mdx
│ │ │ └── installation.mdx
│ ├── platform
│ │ ├── capsules.mdx
│ │ ├── config-files.mdx
│ │ ├── container-settings.mdx
│ │ ├── cronjobs.mdx
│ │ ├── custom-metrics-example.mdx
│ │ ├── custom-metrics.mdx
│ │ ├── extensions.mdx
│ │ ├── instance-overview.mdx
│ │ ├── network-interfaces.mdx
│ │ ├── rbac.mdx
│ │ ├── rollouts-and-rollbacks.mdx
│ │ ├── scale.mdx
│ │ └── service-accounts.mdx
│ └── usage.mdx
├── docusaurus.config.js
├── menu.js
├── package-lock.json
├── package.json
├── plugin-ref-docs
│ ├── config.yaml
│ └── templates
│ │ ├── gv_details.tpl
│ │ ├── gv_list.tpl
│ │ ├── type.tpl
│ │ └── type_members.tpl
├── src
│ ├── components
│ │ ├── Button
│ │ │ └── index.tsx
│ │ ├── DynamicBiIcon
│ │ │ └── index.js
│ │ ├── Feedback
│ │ │ └── index.jsx
│ │ ├── HomepageFeatures
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ └── IconBox
│ │ │ └── index.tsx
│ ├── constants
│ │ └── versions.ts
│ ├── css
│ │ └── custom.css
│ ├── markdown
│ │ ├── examples
│ │ │ └── examples.mdx
│ │ ├── prerequisites
│ │ │ ├── create-credential.md
│ │ │ ├── getting-started.md
│ │ │ ├── install-rig.md
│ │ │ ├── setup-cli.md
│ │ │ └── setup-sdk.md
│ │ └── sdk
│ │ │ └── sdks.mdx
│ ├── providers
│ │ ├── User
│ │ │ └── index.tsx
│ │ └── sidebar
│ │ │ └── index.tsx
│ └── theme
│ │ ├── Admonition
│ │ ├── index.js
│ │ └── styles.module.css
│ │ ├── CodeBlock
│ │ └── index.tsx
│ │ ├── DocCard
│ │ ├── index.js
│ │ └── styles.module.css
│ │ ├── DocCardList
│ │ └── index.js
│ │ ├── DocItem
│ │ ├── Content
│ │ │ └── index.js
│ │ ├── Footer
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Layout
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Metadata
│ │ │ └── index.js
│ │ ├── Paginator
│ │ │ └── index.js
│ │ ├── TOC
│ │ │ ├── Desktop
│ │ │ │ └── index.js
│ │ │ └── Mobile
│ │ │ │ ├── index.js
│ │ │ │ └── styles.module.css
│ │ └── index.js
│ │ ├── DocRoot
│ │ └── Layout
│ │ │ ├── Main
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ │ ├── Sidebar
│ │ │ ├── ExpandButton
│ │ │ │ ├── index.js
│ │ │ │ └── styles.module.css
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── DocSidebarItem
│ │ ├── Category
│ │ │ └── index.js
│ │ ├── Html
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Link
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ └── index.js
│ │ ├── EditThisPage
│ │ └── index.js
│ │ ├── Footer
│ │ ├── Logo
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ └── index.js
│ │ ├── Icon
│ │ └── Arrow
│ │ │ └── index.js
│ │ ├── LastUpdated
│ │ └── index.js
│ │ ├── Navbar
│ │ ├── ColorModeToggle
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Content
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Layout
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ ├── Logo
│ │ │ └── index.js
│ │ ├── MobileSidebar
│ │ │ ├── Header
│ │ │ │ └── index.js
│ │ │ ├── Layout
│ │ │ │ └── index.js
│ │ │ ├── PrimaryMenu
│ │ │ │ └── index.js
│ │ │ ├── SecondaryMenu
│ │ │ │ └── index.js
│ │ │ ├── Toggle
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── Search
│ │ │ ├── index.js
│ │ │ └── styles.module.css
│ │ └── index.js
│ │ ├── Tabs
│ │ ├── index.js
│ │ └── styles.module.css
│ │ └── ThemedImage
│ │ ├── index.js
│ │ └── styles.module.css
└── static
│ ├── .nojekyll
│ ├── img
│ ├── banners
│ │ ├── authentication-banner.png
│ │ ├── banner.png
│ │ ├── capsules-banner.png
│ │ ├── database-banner.png
│ │ ├── docs-banner.png
│ │ ├── helm-migration.png
│ │ ├── kubernetes.png
│ │ ├── local-machine.png
│ │ ├── rig-argo.png
│ │ ├── storage-banner.png
│ │ └── users-banner.png
│ ├── cli
│ │ └── capsule
│ │ │ ├── capsule-status.png
│ │ │ └── deploy-image.png
│ ├── dashboard
│ │ └── platform
│ │ │ ├── capsule-config
│ │ │ ├── autoscaler.png
│ │ │ ├── config-file.png
│ │ │ ├── config-overview.png
│ │ │ ├── kubernetes-diff.png
│ │ │ ├── network-interface.png
│ │ │ ├── nginx-image.png
│ │ │ ├── platform-diff.png
│ │ │ ├── scale.png
│ │ │ └── vertical-scaling.png
│ │ │ ├── capsule-status
│ │ │ └── capsule-status.png
│ │ │ ├── capsule
│ │ │ ├── create.png
│ │ │ └── overview.png
│ │ │ ├── container-registries
│ │ │ └── add-registry.png
│ │ │ ├── container-settings
│ │ │ ├── advanced.png
│ │ │ └── env-vars.png
│ │ │ ├── cronjobs
│ │ │ ├── create.png
│ │ │ └── list-executions.png
│ │ │ ├── instance
│ │ │ ├── collective-logs.png
│ │ │ ├── logs.png
│ │ │ ├── overview.png
│ │ │ ├── shell.png
│ │ │ ├── status.png
│ │ │ └── terminated-overview.png
│ │ │ ├── network
│ │ │ ├── edit-host.png
│ │ │ ├── edit-path.png
│ │ │ └── interface-and-healthchecks.png
│ │ │ ├── project
│ │ │ └── create.png
│ │ │ ├── rbac
│ │ │ ├── add-member.png
│ │ │ └── assign-role.png
│ │ │ ├── rollout
│ │ │ ├── rollback.png
│ │ │ └── stages.png
│ │ │ └── service-accounts
│ │ │ ├── create.png
│ │ │ └── list.png
│ ├── favicon.ico
│ ├── guides
│ │ ├── argo_new_app.png
│ │ ├── argo_repo.png
│ │ ├── argo_rig_deploy.gif
│ │ ├── argo_sync.png
│ │ ├── aws
│ │ │ ├── aws1.png
│ │ │ ├── aws2.png
│ │ │ ├── aws3.png
│ │ │ ├── step1.png
│ │ │ ├── step10.png
│ │ │ ├── step11.png
│ │ │ ├── step2.png
│ │ │ ├── step3.png
│ │ │ ├── step4.png
│ │ │ ├── step5.png
│ │ │ ├── step6.png
│ │ │ ├── step7.png
│ │ │ ├── step8.png
│ │ │ └── step9.png
│ │ └── landingpage.png
│ ├── logo-dark.png
│ ├── logo.png
│ ├── operator-manual
│ │ ├── capsule-spec-translation.png
│ │ ├── environment
│ │ │ ├── multi-cluster.png
│ │ │ └── topology.png
│ │ ├── google-oauth-client.png
│ │ ├── migrate-apply.png
│ │ ├── migrate-deployments.png
│ │ ├── migrate-diff.png
│ │ ├── migrate-parts.png
│ │ └── plugin_pipeline.png
│ ├── overview
│ │ ├── cluster_architecture.svg
│ │ └── platform_architecture_bg.svg
│ └── platform
│ │ ├── capsule-extensions-arch.svg
│ │ ├── capsule-extensions-ui.png
│ │ ├── prometheus.png
│ │ ├── scale.svg
│ │ ├── slack-create-app.png
│ │ └── update-global-notifiers.png
│ └── js
│ └── segment.js
├── examples
└── simple-plugin
│ ├── Dockerfile
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ └── plugin_test.go
├── gen
└── mocks
│ ├── k8s.io
│ └── client-go
│ │ └── discovery
│ │ └── mock_DiscoveryInterface.go
│ └── sigs.k8s.io
│ └── controller-runtime
│ └── pkg
│ └── client
│ └── mock_Client.go
├── go.mod
├── go.sum
├── go.work
├── pkg
├── api
│ ├── config
│ │ └── v1alpha1
│ │ │ ├── groupversion_info.go
│ │ │ ├── operator_config_types.go
│ │ │ ├── platform_config_types.go
│ │ │ ├── platform_config_validate.go
│ │ │ ├── platform_test.go
│ │ │ └── zz_generated.deepcopy.go
│ ├── platform
│ │ └── v1
│ │ │ ├── conversion.go
│ │ │ ├── conversion_test.go
│ │ │ ├── decode.go
│ │ │ ├── decode_test.go
│ │ │ ├── dev_types.go
│ │ │ ├── types.go
│ │ │ └── zz_generated.deepcopy.go
│ ├── v1alpha1
│ │ ├── capsule_conversion.go
│ │ ├── capsule_types.go
│ │ ├── capsule_webhook.go
│ │ ├── groupversion_info.go
│ │ └── zz_generated.deepcopy.go
│ └── v1alpha2
│ │ ├── capsule_conversion.go
│ │ ├── capsule_types.go
│ │ ├── capsule_webhook.go
│ │ ├── capsule_webhook_test.go
│ │ ├── groupversion_info.go
│ │ ├── projectenv_types.go
│ │ └── zz_generated.deepcopy.go
├── apichecker
│ └── apichecker.go
├── build
│ └── build.go
├── cli
│ ├── client.go
│ ├── common.go
│ ├── module.go
│ ├── scope
│ │ └── scope.go
│ ├── test_module.go
│ └── version
│ │ └── version.go
├── controller
│ ├── capsule_controller.go
│ ├── plugin
│ │ ├── external_plugin.go
│ │ ├── heap.go
│ │ ├── helpers.go
│ │ ├── helpers_test.go
│ │ ├── manager.go
│ │ ├── server.go
│ │ ├── step.go
│ │ ├── step_test.go
│ │ └── watcher.go
│ └── project_controller.go
├── errors
│ ├── errors.go
│ └── grpc_test.go
├── field
│ ├── apply.go
│ ├── apply_test.go
│ ├── change.go
│ ├── compare.go
│ ├── compare_test.go
│ └── value.go
├── handler
│ └── api
│ │ ├── capabilities
│ │ └── handler.go
│ │ ├── cluster
│ │ └── handler.go
│ │ └── pipeline
│ │ ├── dry_run.go
│ │ ├── handler.go
│ │ └── watch_object_status.go
├── hash
│ ├── hash.go
│ └── hash_test.go
├── license
│ └── limits.go
├── manager
│ └── manager.go
├── obj
│ ├── comparison.go
│ ├── comparison_test.go
│ ├── decode.go
│ ├── decode_test.go
│ ├── dump.go
│ ├── dump_test.go
│ ├── encode.go
│ ├── merge.go
│ ├── merge_test.go
│ └── new.go
├── pipeline
│ ├── capsule_request.go
│ ├── capsule_request_test.go
│ ├── helpers.go
│ ├── owners.go
│ ├── pipeline.go
│ ├── projectenv_request.go
│ ├── request.go
│ ├── step.go
│ └── types.go
├── ptr
│ └── ptr.go
├── rbac
│ ├── actions.go
│ ├── permissions.go
│ └── resources.go
├── roclient
│ ├── layered_reader.go
│ ├── layered_reader_test.go
│ └── reader.go
├── scheme
│ ├── scheme.go
│ └── version_mapper.go
├── service
│ ├── capabilities
│ │ ├── capabilities.go
│ │ └── capabilities_test.go
│ ├── cluster
│ │ └── service.go
│ ├── config
│ │ ├── config.go
│ │ └── config_test.go
│ ├── objectstatus
│ │ ├── service.go
│ │ └── watcher.go
│ └── pipeline
│ │ ├── capsule_extension_step.go
│ │ ├── default_pipeline.go
│ │ └── service.go
├── tunnel
│ ├── buffer.go
│ └── tunnel.go
├── utils
│ ├── defaults.go
│ ├── docker.go
│ ├── path_validate.go
│ ├── path_validate_test.go
│ ├── retry.go
│ ├── test_helper.go
│ ├── users_helpers.go
│ ├── wrap.go
│ └── wrap_test.go
└── uuid
│ └── uuid.go
├── plugins
├── allplugins
│ └── all.go
├── builtin
│ ├── annotations
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ ├── argo_rollout
│ │ ├── README.md
│ │ ├── plugin.go
│ │ ├── plugiun_test.go
│ │ └── watcher.go
│ ├── datadog
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ ├── env_mapping
│ │ ├── README.md
│ │ └── plugin.go
│ ├── envvar_csi
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── watcher.go
│ ├── google_cloud_sql_auth_proxy
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ ├── init_container
│ │ ├── README.md
│ │ └── plugin.go
│ ├── object_create
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ ├── object_template
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ ├── placement
│ │ ├── README.md
│ │ ├── plugin.go
│ │ └── plugin_test.go
│ └── sidecar
│ │ ├── README.md
│ │ └── plugin.go
└── capsulesteps
│ ├── cron_jobs
│ ├── README.md
│ ├── plugin.go
│ └── watcher.go
│ ├── deployment
│ ├── README.md
│ ├── plugin.go
│ ├── watcher.go
│ └── watcher_test.go
│ ├── ingress_routes
│ ├── README.md
│ ├── plugin.go
│ └── watcher.go
│ ├── service_account
│ ├── README.md
│ └── plugin.go
│ ├── service_monitor
│ ├── README.md
│ └── plugin.go
│ └── vpa
│ ├── README.md
│ ├── plugin.go
│ └── watcher.go
├── proto
├── .clang-format
├── buf.gen.publish.yaml
├── buf.gen.yaml
├── buf.work.yaml
└── rig
│ ├── api
│ └── v1
│ │ ├── activity
│ │ ├── activity.proto
│ │ └── service.proto
│ │ ├── authentication
│ │ ├── service.proto
│ │ └── user.proto
│ │ ├── capsule
│ │ ├── capsule.proto
│ │ ├── change.proto
│ │ ├── event.proto
│ │ ├── field.proto
│ │ ├── image.proto
│ │ ├── instance.proto
│ │ ├── instance
│ │ │ └── status.proto
│ │ ├── job.proto
│ │ ├── log.proto
│ │ ├── pipeline
│ │ │ └── status.proto
│ │ ├── revision.proto
│ │ ├── rollout.proto
│ │ ├── rollout
│ │ │ └── status.proto
│ │ ├── service.proto
│ │ ├── sidecar.proto
│ │ └── status.proto
│ │ ├── cluster
│ │ ├── cluster.proto
│ │ └── service.proto
│ │ ├── environment
│ │ ├── environment.proto
│ │ ├── revision.proto
│ │ └── service.proto
│ │ ├── group
│ │ ├── group.proto
│ │ └── service.proto
│ │ ├── image
│ │ └── service.proto
│ │ ├── issue
│ │ ├── issue.proto
│ │ └── service.proto
│ │ ├── metrics
│ │ ├── metrics.proto
│ │ └── service.proto
│ │ ├── project
│ │ ├── project.proto
│ │ ├── revision.proto
│ │ ├── service.proto
│ │ └── settings
│ │ │ ├── service.proto
│ │ │ └── settings.proto
│ │ ├── role
│ │ ├── role.proto
│ │ └── service.proto
│ │ ├── service_account
│ │ ├── service.proto
│ │ └── service_account.proto
│ │ ├── settings
│ │ ├── configuration.proto
│ │ ├── service.proto
│ │ └── settings.proto
│ │ ├── tunnel
│ │ └── service.proto
│ │ └── user
│ │ ├── service.proto
│ │ ├── settings
│ │ ├── service.proto
│ │ └── settings.proto
│ │ └── user.proto
│ ├── buf.md
│ ├── buf.yaml
│ ├── config
│ └── v1alpha1
│ │ └── generated.proto
│ ├── k8s.io
│ ├── api
│ │ └── autoscaling
│ │ │ └── v2
│ │ │ └── generated.proto
│ └── apimachinery
│ │ └── pkg
│ │ ├── api
│ │ └── resource
│ │ │ └── generated.proto
│ │ └── apis
│ │ └── meta
│ │ └── v1
│ │ └── generated.proto
│ ├── model
│ ├── auth.proto
│ ├── author.proto
│ ├── common.proto
│ ├── credentials.proto
│ ├── environment.proto
│ ├── git.proto
│ ├── id.proto
│ ├── metadata.proto
│ ├── metrics.proto
│ ├── notification.proto
│ ├── pipeline.proto
│ ├── revision.proto
│ └── user.proto
│ ├── operator
│ └── api
│ │ └── v1
│ │ ├── capabilities
│ │ └── service.proto
│ │ ├── cluster
│ │ └── service.proto
│ │ ├── pipeline
│ │ ├── object_status.proto
│ │ └── service.proto
│ │ └── plugin
│ │ └── service.proto
│ └── platform
│ └── v1
│ └── generated.proto
├── scripts
└── crdcopy.py
├── taskfile.yaml
├── test
└── integration
│ └── k8s
│ ├── capsule_controller_test.go
│ ├── capsule_validation_test.go
│ ├── cert-manager.crds.yaml
│ ├── pipeline_plugin_test.go
│ ├── plugin_suite_test.go
│ ├── service-monitor.crds.yaml
│ ├── suite_test.go
│ └── vpa.crds.yaml
└── tools
├── go.mod
├── go.sum
├── go.work
├── readme_truncate.py
├── taskfile.yaml
└── tools.go
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 | ---
8 |
9 | #### Describe the bug
10 |
11 | A clear and concise description of what the bug is.
12 |
13 | #### To Reproduce
14 |
15 | Steps to reproduce the behavior:
16 | 1. Go to '...'
17 | 2. Click on '....'
18 | 3. Scroll down to '....'
19 | 4. See error
20 |
21 | #### Expected behavior
22 |
23 | A clear and concise description of what you expected to happen.
24 |
25 | #### Screenshots
26 |
27 | If applicable, add screenshots to help explain your problem.
28 |
29 | #### Additional contextual information
30 |
31 | - OS: [e.g. macOS Ventura 13.4.1]
32 | - Browser incl. version [e.g. firefox 117.0.1, chrome 117.0.5938.62, safari 16.5.1]
33 | - Rig Version [e.g. 1.1.3]
34 | - Cluster Type and version [e.g docker 24.0.2, k8s 1.27.3 (gke, eks, aks)]
35 |
--------------------------------------------------------------------------------
/.github/auto_assign.yml:
--------------------------------------------------------------------------------
1 | # Set to true to add reviewers to pull requests
2 | addReviewers: true
3 |
4 | # Set to true to add assignees to pull requests
5 | addAssignees: true
6 |
7 | # A list of reviewers to be added to pull requests (GitHub user name)
8 | reviewers:
9 | - andersjohnsen
10 | - Munklinde96
11 | - MatiasFrank
12 |
13 | # A list of keywords to be skipped the process that add reviewers if pull requests include it
14 | skipKeywords:
15 | - wip
16 |
17 | # A number of reviewers added to the pull request
18 | # Set 0 to add all the reviewers (default: 0)
19 | numberOfReviewers: 0
20 |
--------------------------------------------------------------------------------
/.github/workflows/cache.yml:
--------------------------------------------------------------------------------
1 | name: Cache
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | cache:
10 | runs-on: ubuntu
11 | steps:
12 | - uses: actions/checkout@v3
13 |
14 | - name: Set up Go
15 | uses: actions/setup-go@v4
16 | with:
17 | go-version: 1.23
18 |
19 | - name: Install Task
20 | uses: arduino/setup-task@v1
21 | with:
22 | version: 3.x
23 | repo-token: ${{ secrets.GITHUB_TOKEN }}
24 |
25 | - name: Cache tools
26 | uses: actions/cache@v3
27 | with:
28 | path: |
29 | tools/bin
30 | key: ${{ runner.os }}-tools-${{ hashFiles('tools/go.sum') }}
31 | restore-keys: |
32 | ${{ runner.os }}-tools-
33 |
34 | - name: Populate tool cache
35 | run: task tools:ci
36 |
37 | - name: Populate go cache
38 | run: task build mocks
39 |
--------------------------------------------------------------------------------
/.github/workflows/pr-close-docs.yml:
--------------------------------------------------------------------------------
1 | name: PR Close docs
2 |
3 | on:
4 | workflow_dispatch:
5 | pull_request:
6 | branches:
7 | - main
8 | types:
9 | - closed
10 |
11 | jobs:
12 | close:
13 | runs-on: ubuntu
14 | steps:
15 | - name: Checkout
16 | uses: actions/checkout@v3
17 |
18 | - name: Setup rig
19 | uses: rigdev/setup-rig@v1
20 | with:
21 | host: ${{ vars.RIG_HOST }}
22 | client-id: ${{ vars.RIG_CLIENT_ID }}
23 | client-secret: ${{ secrets.RIG_CLIENT_SECRET }}
24 |
25 | - name: Delete Environment
26 | run: |
27 | rig env delete "docs-pr-${{ github.event.number }}" -f
28 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | name: "Close stale issues and PRs"
2 | on:
3 | schedule:
4 | - cron: "30 1 * * *"
5 |
6 | jobs:
7 | stale:
8 | runs-on: ubuntu
9 | steps:
10 | - uses: actions/stale@v8
11 | with:
12 | days-before-stale: 30
13 | days-before-close: 7
14 | stale-issue-message: "This issue is stale because it has been waiting for more information for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. If the issue has been clarified, remove the needs-more-info label."
15 | stale-pr-message: "This pr is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
16 | any-of-issue-labels: needs-more-info
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # binaries
2 | /bin
3 | /tools/bin
4 | /dist
5 |
6 | # generated code
7 | /gen/*
8 | !/gen/mocks
9 |
10 | # test results
11 | /test-result.xml
12 | /cover.out
13 |
14 | # dependencies
15 | go.work.sum
16 |
17 | # helm charts
18 | deploy/charts/*/Chart.lock
19 | deploy/charts/*/charts
20 |
21 | # at some point we might want to commit this so that rig can be installed via
22 | # kustomize
23 | /deploy/kustomize
24 |
25 | # editor specifics
26 | .vscode
27 | !/.vscode/settings.json
28 |
29 | # task cache
30 | /.task
31 |
32 | gen/uncommittedmocks
33 |
--------------------------------------------------------------------------------
/.golangci.yml:
--------------------------------------------------------------------------------
1 | run:
2 | skip-dirs:
3 | - docs
4 | - gen
5 | linters:
6 | enable:
7 | - revive
8 | - lll
9 | issues:
10 | exclude-rules:
11 | - linters:
12 | - lll
13 | source: '^//\+kubebuilder'
14 | - linters:
15 | - revive
16 | text: "empty-block: this block is empty, you can remove it"
17 |
--------------------------------------------------------------------------------
/.mockery.yaml:
--------------------------------------------------------------------------------
1 | with-expecter: true
2 | dir: "gen/mocks/{{.PackagePath}}"
3 | packages:
4 | github.com/rigdev/rig/pkg/service/config:
5 | interfaces:
6 | Service: {}
7 | sigs.k8s.io/controller-runtime/pkg/client:
8 | interfaces:
9 | Client: {}
10 | k8s.io/client-go/discovery:
11 | interfaces:
12 | DiscoveryInterface: {}
13 |
--------------------------------------------------------------------------------
/.mockery_uncommitted.yaml:
--------------------------------------------------------------------------------
1 | with-expecter: true
2 | dir: "gen/uncommittedmocks/{{.PackagePath}}"
3 | packages:
4 | github.com/rigdev/rig-go-sdk:
5 | interfaces:
6 | Client: {}
7 | github.com/rigdev/rig/cmd/common:
8 | interfaces:
9 | Prompter: {}
10 | github.com/rigdev/rig-go-api/api/v1/authentication/authenticationconnect:
11 | interfaces:
12 | ServiceClient: {}
13 | github.com/rigdev/rig-go-api/api/v1/project/projectconnect:
14 | interfaces:
15 | ServiceClient: {}
16 | github.com/rigdev/rig-go-api/api/v1/environment/environmentconnect:
17 | interfaces:
18 | ServiceClient: {}
19 | github.com/rigdev/rig-go-api/api/v1/capsule/capsuleconnect:
20 | interfaces:
21 | ServiceClient: {}
22 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "protoc": {
3 | "options": ["--proto_path=proto/rig"]
4 | }
5 | }
--------------------------------------------------------------------------------
/build/package/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.23-alpine3.20 AS builder
2 |
3 | ENV CGO_ENABLED=0
4 |
5 | WORKDIR /app
6 |
7 | RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
8 | apk add --no-cache ca-certificates go-task git clang-extra-tools && \
9 | addgroup -g 1000 nonroot && \
10 | adduser -u 1000 -G nonroot -D nonroot
11 |
12 | COPY go.mod go.sum taskfile.yaml ./
13 | COPY tools tools
14 | RUN --mount=type=cache,target=/go/pkg/mod \
15 | --mount=type=cache,target=/root/.cache/go-build \
16 | go-task tools:buf \
17 | tools:protoc-gen-go \
18 | tools:protoc-gen-connect-go \
19 | tools:protoc-gen-go-grpc \
20 | tools:protoc-gen-doc && \
21 | go mod download # && go mod verify
22 |
23 | COPY . .
24 |
25 | RUN --mount=type=cache,target=/go/pkg/mod \
26 | --mount=type=cache,target=/root/.cache/go-build \
27 | GOFLAGS='-ldflags=-s' go-task proto build-rig-operator
28 |
29 | FROM alpine:3
30 |
31 | RUN apk add --no-cache curl
32 | COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
33 | COPY --from=builder /app/bin/rig-operator /usr/local/bin/
34 | COPY --from=builder /etc/passwd /etc/passwd
35 |
36 | USER 1000
37 |
38 | CMD ["rig-operator"]
39 |
--------------------------------------------------------------------------------
/build/package/Dockerfile.dockerignore:
--------------------------------------------------------------------------------
1 | *
2 | !/docs/api-ref-docs/templates/service.tmpl
3 | !/go.mod
4 | !/go.sum
5 | !/go.work
6 | !/go.work.sum
7 | !/taskfile.yaml
8 | !/tools/go.mod
9 | !/tools/go.sum
10 | !/tools/taskfile.yaml
11 | !/proto
12 | !/cmd
13 | !/pkg
14 | !/internal
15 | !/plugins
16 |
--------------------------------------------------------------------------------
/build/package/Dockerfile.local:
--------------------------------------------------------------------------------
1 | FROM alpine:3
2 |
3 | RUN apk add --no-cache ca-certificates curl
4 |
5 | COPY ./bin/rig-operator /usr/local/bin/
6 |
7 | USER 1000
8 |
9 | CMD ["rig-operator"]
10 |
--------------------------------------------------------------------------------
/build/package/docs/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM --platform=$BUILDPLATFORM node:21.7.1-alpine3.18 AS builder
2 |
3 | WORKDIR /app
4 |
5 | COPY docs/package.json docs/package-lock.json ./
6 | RUN npm ci
7 |
8 | COPY docs .
9 | RUN npm run build
10 |
11 | FROM nginx:1.25.4-alpine3.18
12 |
13 | COPY build/package/docs/nginx.conf /etc/nginx/conf.d/default.conf
14 | COPY --from=builder /app/build /usr/share/nginx/html
15 |
--------------------------------------------------------------------------------
/build/package/docs/Dockerfile.dockerignore:
--------------------------------------------------------------------------------
1 | *
2 | !/build/package/docs/nginx.conf
3 | !/docs/babel.config.js
4 | !/docs/docs
5 | !/docs/docusaurus.config.js
6 | !/docs/menu.js
7 | !/docs/package-lock.json
8 | !/docs/package.json
9 | !/docs/src
10 | !/docs/static
11 |
--------------------------------------------------------------------------------
/build/package/docs/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 |
5 | location / {
6 | root /usr/share/nginx/html;
7 | index index.html index.htm;
8 | }
9 |
10 | error_page 500 502 503 504 /50x.html;
11 | location = /50x.html {
12 | root /usr/share/nginx/html;
13 | }
14 |
15 | gzip on;
16 | gzip_vary on;
17 | gzip_proxied any;
18 | gzip_comp_level 6;
19 | gzip_min_length 256;
20 | gzip_types
21 | text/plain
22 | text/html
23 | text/css
24 | application/javascript;
25 | }
26 |
--------------------------------------------------------------------------------
/build/package/goreleaser/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine AS builder
2 |
3 | RUN apk add --no-cache ca-certificates && \
4 | addgroup -g 1000 nonroot && \
5 | adduser -u 1000 -G nonroot -D nonroot
6 |
7 | FROM alpine:3
8 | RUN apk add --no-cache curl
9 |
10 | COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
11 | COPY rig-operator /usr/local/bin/
12 | COPY --from=builder /etc/passwd /etc/passwd
13 |
14 | USER 1000
15 |
16 | CMD ["rig-operator"]
17 |
--------------------------------------------------------------------------------
/build/package/goreleaser/rig-proxy.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:3.19.1 AS builder
2 |
3 | RUN apk add --no-cache ca-certificates && \
4 | addgroup -g 1000 nonroot && \
5 | adduser -u 1000 -G nonroot -D nonroot
6 |
7 | COPY rig-proxy /usr/local/bin/
8 |
9 | USER 1000
10 |
11 | CMD ["rig-proxy"]
12 |
--------------------------------------------------------------------------------
/build/package/goreleaser/rig.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:3.19.1 AS builder
2 |
3 | RUN apk add --no-cache ca-certificates && \
4 | addgroup -g 1000 nonroot && \
5 | adduser -u 1000 -G nonroot -D nonroot
6 |
7 | COPY rig /usr/local/bin/
8 |
9 | USER 1000
10 |
11 | CMD ["rig"]
12 |
--------------------------------------------------------------------------------
/build/package/proxy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.23-alpine3.20 AS builder
2 |
3 | ENV CGO_ENABLED=0
4 |
5 | WORKDIR /app
6 |
7 | RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
8 | apk add --no-cache ca-certificates go-task git clang-extra-tools && \
9 | addgroup -g 1000 nonroot && \
10 | adduser -u 1000 -G nonroot -D nonroot
11 |
12 | COPY go.mod go.sum taskfile.yaml ./
13 | COPY tools tools
14 | RUN --mount=type=cache,target=/go/pkg/mod \
15 | --mount=type=cache,target=/root/.cache/go-build \
16 | go-task tools:buf \
17 | tools:protoc-gen-go \
18 | tools:protoc-gen-connect-go \
19 | tools:protoc-gen-go-grpc \
20 | tools:protoc-gen-doc && \
21 | go mod download # && go mod verify
22 |
23 | COPY . .
24 |
25 | RUN --mount=type=cache,target=/go/pkg/mod \
26 | --mount=type=cache,target=/root/.cache/go-build \
27 | GOFLAGS='-ldflags=-s' go-task proto build-rig-proxy
28 |
29 | FROM alpine:3
30 |
31 | RUN apk add --no-cache curl
32 |
33 | COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
34 | COPY --from=builder /app/bin/rig-proxy /usr/local/bin/
35 | COPY --from=builder /etc/passwd /etc/passwd
36 |
37 | USER 1000
38 |
39 | CMD ["rig-proxy"]
40 |
--------------------------------------------------------------------------------
/build/package/proxy/Dockerfile.dockerignore:
--------------------------------------------------------------------------------
1 | *
2 | !/docs/api-ref-docs/templates/service.tmpl
3 | !/go.mod
4 | !/go.sum
5 | !/go.work
6 | !/go.work.sum
7 | !/taskfile.yaml
8 | !/tools/go.mod
9 | !/tools/go.sum
10 | !/tools/taskfile.yaml
11 | !/proto
12 | !/cmd
13 | !/pkg
14 | !/internal
15 | !/plugins
16 |
--------------------------------------------------------------------------------
/build/package/proxy/Dockerfile.local:
--------------------------------------------------------------------------------
1 | FROM alpine:3 AS builder
2 |
3 | RUN apk add --no-cache ca-certificates curl
4 |
5 | FROM scratch
6 |
7 | COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
8 | COPY ./bin/rig-proxy /usr/local/bin/
9 |
10 | CMD ["rig-proxy"]
11 |
--------------------------------------------------------------------------------
/build/package/rig/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.23-alpine3.20 AS builder
2 |
3 | ENV CGO_ENABLED=0
4 |
5 | WORKDIR /app
6 |
7 | RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
8 | apk add --no-cache ca-certificates go-task git clang-extra-tools && \
9 | addgroup -g 1000 nonroot && \
10 | adduser -u 1000 -G nonroot -D nonroot
11 |
12 | COPY go.mod go.sum taskfile.yaml ./
13 | COPY tools tools
14 | RUN --mount=type=cache,target=/go/pkg/mod \
15 | --mount=type=cache,target=/root/.cache/go-build \
16 | go-task tools:buf \
17 | tools:protoc-gen-go \
18 | tools:protoc-gen-connect-go \
19 | tools:protoc-gen-go-grpc \
20 | tools:protoc-gen-doc && \
21 | go mod download # && go mod verify
22 |
23 | COPY . .
24 |
25 | RUN --mount=type=cache,target=/go/pkg/mod \
26 | --mount=type=cache,target=/root/.cache/go-build \
27 | GOFLAGS='-ldflags=-s' go-task proto build-rig
28 |
29 | FROM alpine:3
30 |
31 | RUN apk add --no-cache curl
32 | COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
33 | COPY --from=builder /app/bin/rig /usr/local/bin/
34 | COPY --from=builder /etc/passwd /etc/passwd
35 |
36 | USER 1000
37 |
38 | CMD ["rig"]
39 |
--------------------------------------------------------------------------------
/build/package/rig/Dockerfile.dockerignore:
--------------------------------------------------------------------------------
1 | *
2 | !/docs/api-ref-docs/templates/service.tmpl
3 | !/go.mod
4 | !/go.sum
5 | !/go.work
6 | !/go.work.sum
7 | !/taskfile.yaml
8 | !/tools/go.mod
9 | !/tools/go.sum
10 | !/tools/taskfile.yaml
11 | !/proto
12 | !/cmd
13 | !/pkg
14 | !/internal
15 | !/plugins
16 |
--------------------------------------------------------------------------------
/cmd/common/cli_group_ids.go:
--------------------------------------------------------------------------------
1 | package common
2 |
3 | const (
4 | AuthGroupID = "auth"
5 | OtherGroupID = "other"
6 | CapsuleGroupID = "capsule"
7 | ManagementGroupID = "management"
8 | )
9 |
10 | const (
11 | AuthGroupTitle = "Authentication Commands - Manage access to Rig"
12 | OtherGroupTitle = "Other Commands"
13 | CapsuleGroupTitle = "Capsule Commands - Capsules and their deployments"
14 | ManagementGroupTitle = "Management Commands - Manage everything around capsules"
15 | )
16 |
--------------------------------------------------------------------------------
/cmd/common/prompt/prompt.go:
--------------------------------------------------------------------------------
1 | package prompt
2 |
--------------------------------------------------------------------------------
/cmd/common/prompt/validate.go:
--------------------------------------------------------------------------------
1 | package prompt
2 |
--------------------------------------------------------------------------------
/cmd/rig-operator/log/log.go:
--------------------------------------------------------------------------------
1 | package log
2 |
3 | import (
4 | "github.com/go-logr/logr"
5 | "sigs.k8s.io/controller-runtime/pkg/log/zap"
6 | )
7 |
8 | func New(devMode bool) logr.Logger {
9 | return zap.New(zap.UseDevMode(devMode))
10 | }
11 |
--------------------------------------------------------------------------------
/cmd/rig-operator/plugin.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/rigdev/rig/pkg/controller/plugin"
7 | "github.com/rigdev/rig/plugins/allplugins"
8 | "github.com/spf13/cobra"
9 | )
10 |
11 | func pluginSetup(parent *cobra.Command) {
12 | pluginCmd := &cobra.Command{
13 | Use: "plugin",
14 | Short: "Execute a builtin plugin",
15 | Args: cobra.ExactArgs(1),
16 | RunE: runPlugin,
17 | }
18 | parent.AddCommand(pluginCmd)
19 | }
20 |
21 | func runPlugin(_ *cobra.Command, args []string) error {
22 | pluginName := args[0]
23 | p, ok := allplugins.Plugins[pluginName]
24 | if !ok {
25 | return fmt.Errorf("unknown plugin name %s", pluginName)
26 | }
27 | plugin.StartPlugin(pluginName, p)
28 | return nil
29 | }
30 |
--------------------------------------------------------------------------------
/cmd/rig-ops/cmd/base/flags.go:
--------------------------------------------------------------------------------
1 | package base
2 |
3 | import "github.com/rigdev/rig/cmd/common"
4 |
5 | type FlagsStruct struct {
6 | KubeContext string
7 | KubeConfig string
8 | RigConfig string
9 | RigContext string
10 | Namespace string
11 | Project string
12 | Environment string
13 | KubeFile string
14 | KubeDir string
15 | OperatorConfig string
16 | OutputType common.OutputType
17 | }
18 |
19 | var Flags = FlagsStruct{
20 | OutputType: common.OutputTypePretty,
21 | }
22 |
--------------------------------------------------------------------------------
/cmd/rig-ops/cmd/migrate/capsule_name.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import "github.com/rigdev/rig/pkg/errors"
4 |
5 | type CapsuleName string
6 |
7 | // String is used both by fmt.Print and by Cobra in help text
8 | func (c *CapsuleName) String() string {
9 | return string(*c)
10 | }
11 |
12 | // Set must have pointer receiver so it doesn't change the value of a copy
13 | func (c *CapsuleName) Set(v string) error {
14 | switch v {
15 | case string(CapsuleNameService), string(CapsuleNameDeployment), string(CapsuleNameInput):
16 | *c = CapsuleName(v)
17 | return nil
18 | default:
19 | return errors.New(`must be one of "service", "deployment", or "input"`)
20 | }
21 | }
22 |
23 | // Type is only used in help text
24 | func (c *CapsuleName) Type() string {
25 | return "service,deployment,input"
26 | }
27 |
28 | const (
29 | CapsuleNameService CapsuleName = "service"
30 | CapsuleNameDeployment CapsuleName = "deployment"
31 | CapsuleNameInput CapsuleName = "input"
32 | )
33 |
--------------------------------------------------------------------------------
/cmd/rig-ops/cmd/migrate/export.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import (
4 | "os"
5 |
6 | platformv1 "github.com/rigdev/rig-go-api/platform/v1"
7 | "github.com/rigdev/rig/cmd/common"
8 | )
9 |
10 | func exportCapsule(capsule *platformv1.Capsule, path string) error {
11 | str, err := common.Format(capsule, common.OutputTypeYAML)
12 | if err != nil {
13 | return err
14 | }
15 |
16 | return os.WriteFile(path, []byte(str), 0644)
17 | }
18 |
--------------------------------------------------------------------------------
/cmd/rig-ops/cmd/migrate/warning.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | type Warning struct {
8 | Kind string
9 | Name string
10 | Field string
11 | Warning string
12 | Suggestion string
13 | }
14 |
15 | func (w *Warning) String() string {
16 | str := fmt.Sprintf("%s/%s", w.Kind, w.Name)
17 |
18 | if w.Field != "" {
19 | str += fmt.Sprintf(".%s", w.Field)
20 | }
21 |
22 | str += fmt.Sprintf(":\nWarning: %s", w.Warning)
23 |
24 | if w.Suggestion != "" {
25 | str += fmt.Sprintf("\nSugggestion: %s", w.Suggestion)
26 | }
27 |
28 | return str + "\n-----------"
29 | }
30 |
--------------------------------------------------------------------------------
/cmd/rig-ops/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "os"
6 |
7 | "github.com/rigdev/rig/cmd/rig-ops/cmd"
8 | "github.com/rigdev/rig/pkg/cli"
9 | "github.com/rigdev/rig/pkg/errors"
10 | "go.uber.org/dig"
11 | )
12 |
13 | func main() {
14 | if err := cmd.Run(cli.StandardSetupContext); err != nil {
15 | fmt.Println(errors.MessageOf(dig.RootCause(err)))
16 | os.Exit(1)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/cmd/rig-proxy/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | )
7 |
8 | func main() {
9 | rootCmd := createRootCMD()
10 | if err := rootCmd.Execute(); err != nil {
11 | fmt.Println(err)
12 | os.Exit(1)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/auth/get.go:
--------------------------------------------------------------------------------
1 | package auth
2 |
3 | import (
4 | "context"
5 | "time"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/jedib0t/go-pretty/v6/table"
9 | "github.com/rigdev/rig-go-api/api/v1/authentication"
10 | "github.com/rigdev/rig/cmd/common"
11 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
12 | "github.com/spf13/cobra"
13 | )
14 |
15 | func (c *Cmd) get(ctx context.Context, cmd *cobra.Command, _ []string) error {
16 | res, err := c.Rig.Authentication().Get(ctx, &connect.Request[authentication.GetRequest]{
17 | Msg: &authentication.GetRequest{},
18 | })
19 | if err != nil {
20 | return err
21 | }
22 |
23 | if flags.Flags.OutputType != common.OutputTypePretty {
24 | return common.FormatPrint(res.Msg, flags.Flags.OutputType)
25 | }
26 |
27 | ui := res.Msg.GetUserInfo()
28 |
29 | t := table.NewWriter()
30 | t.AppendHeader(table.Row{"Entry", "Value"})
31 | t.AppendRow(table.Row{"ID", res.Msg.GetUserId()})
32 | t.AppendRow(table.Row{"Username", ui.GetUsername()})
33 | t.AppendRow(table.Row{"Email", ui.GetEmail()})
34 | t.AppendRow(table.Row{"Phone number", ui.GetPhoneNumber()})
35 | t.AppendRow(table.Row{"Created at", ui.GetCreatedAt().AsTime().Format(time.RFC3339)})
36 |
37 | cmd.Println(t.Render())
38 |
39 | return nil
40 | }
41 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/instance/monitor_size.go:
--------------------------------------------------------------------------------
1 | //go:build !windows
2 | // +build !windows
3 |
4 | package instance
5 |
6 | import (
7 | "os"
8 | "os/signal"
9 | "syscall"
10 | )
11 |
12 | func (tty *Tty) MonitorSize() error {
13 | go func() {
14 | sigChan := make(chan os.Signal, 1)
15 | signal.Notify(sigChan, syscall.SIGWINCH)
16 | defer func() {
17 | signal.Stop(sigChan)
18 | close(sigChan)
19 | }()
20 |
21 | for range sigChan {
22 | w, h := tty.GetTtySize()
23 | tty.resizeChan <- sizeMsg{
24 | width: w,
25 | height: h,
26 | }
27 | }
28 | }()
29 |
30 | return nil
31 | }
32 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/instance/monitor_size_windows.go:
--------------------------------------------------------------------------------
1 | package instance
2 |
3 | import (
4 | "time"
5 | )
6 |
7 | func (tty *Tty) MonitorSize() error {
8 | go func() {
9 | prevH, prevW := tty.GetTtySize()
10 | for {
11 | time.Sleep(time.Millisecond * 250)
12 | h, w := tty.GetTtySize()
13 |
14 | if prevW != w || prevH != h {
15 | tty.resizeChan <- sizeMsg{
16 | width: w,
17 | height: h,
18 | }
19 | }
20 | prevH = h
21 | prevW = w
22 | }
23 | }()
24 |
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/instance/restart.go:
--------------------------------------------------------------------------------
1 | package instance
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/capsule"
8 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) restart(ctx context.Context, cmd *cobra.Command, args []string) error {
13 | arg := ""
14 | if len(args) > 1 {
15 | arg = args[1]
16 | }
17 |
18 | instanceID, err := c.provideInstanceID(ctx, capsule_cmd.CapsuleID, arg, cmd.ArgsLenAtDash())
19 | if err != nil {
20 | return err
21 | }
22 |
23 | if _, err := c.Rig.Capsule().RestartInstance(ctx, &connect.Request[capsule.RestartInstanceRequest]{
24 | Msg: &capsule.RestartInstanceRequest{
25 | CapsuleId: capsule_cmd.CapsuleID,
26 | InstanceId: instanceID,
27 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
28 | EnvironmentId: c.Scope.GetCurrentContext().GetEnvironment(),
29 | },
30 | }); err != nil {
31 | return err
32 | }
33 |
34 | cmd.Println("Instance restarted")
35 |
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/pipeline/abort.go:
--------------------------------------------------------------------------------
1 | package pipeline
2 |
3 | import (
4 | "context"
5 | "strconv"
6 |
7 | "connectrpc.com/connect"
8 | capsule_api "github.com/rigdev/rig-go-api/api/v1/capsule"
9 | "github.com/rigdev/rig/pkg/errors"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) abort(ctx context.Context, cmd *cobra.Command, args []string) error {
14 | pipelineIDStr := ""
15 | var err error
16 | if len(args) == 0 {
17 | if !c.Scope.IsInteractive() {
18 | return errors.InvalidArgumentErrorf("missing pipeline execution id")
19 | }
20 |
21 | pipelineIDStr, err = c.promptForPipelineID(ctx)
22 | if err != nil {
23 | return err
24 | }
25 | } else {
26 | pipelineIDStr = args[0]
27 | }
28 |
29 | pipelineID, err := strconv.ParseUint(pipelineIDStr, 10, 64)
30 | if err != nil {
31 | return err
32 | }
33 |
34 | _, err = c.Rig.Capsule().AbortPipeline(ctx, connect.NewRequest(&capsule_api.AbortPipelineRequest{
35 | ExecutionId: pipelineID,
36 | }))
37 | if err != nil {
38 | return err
39 | }
40 |
41 | cmd.Printf("pipeline %v aborted\n", pipelineID)
42 | return nil
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/pipeline/start.go:
--------------------------------------------------------------------------------
1 | package pipeline
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | capsule_api "github.com/rigdev/rig-go-api/api/v1/capsule"
8 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
9 | "github.com/rigdev/rig/pkg/errors"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) start(ctx context.Context, cmd *cobra.Command, args []string) error {
14 | pipelineName := ""
15 | var err error
16 | if len(args) < 2 {
17 | if !c.Scope.IsInteractive() {
18 | return errors.InvalidArgumentErrorf("missing pipeline name")
19 | }
20 |
21 | pipelineName, err = c.promptForPipelineName(ctx)
22 | if err != nil {
23 | return err
24 | }
25 | } else {
26 | pipelineName = args[1]
27 | }
28 |
29 | resp, err := c.Rig.Capsule().StartPipeline(ctx, connect.NewRequest(&capsule_api.StartPipelineRequest{
30 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
31 | CapsuleId: capsule_cmd.CapsuleID,
32 | PipelineName: pipelineName,
33 | }))
34 | if err != nil {
35 | return err
36 | }
37 |
38 | cmd.Printf("pipeline %v started with execution id %v\n", pipelineName, resp.Msg.Status.GetExecutionId())
39 |
40 | return nil
41 | }
42 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/root/create.go:
--------------------------------------------------------------------------------
1 | package root
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/capsule"
8 | "github.com/rigdev/rig/cmd/common"
9 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) create(ctx context.Context, cmd *cobra.Command, args []string) error {
14 | var err error
15 | if len(args) == 0 {
16 | capsule_cmd.CapsuleID, err = c.Prompter.Input("Capsule name:", common.ValidateSystemNameOpt)
17 | if err != nil {
18 | return err
19 | }
20 | } else {
21 | capsule_cmd.CapsuleID = args[0]
22 | }
23 |
24 | res, err := c.Rig.Capsule().Create(ctx, &connect.Request[capsule.CreateRequest]{
25 | Msg: &capsule.CreateRequest{
26 | Name: capsule_cmd.CapsuleID,
27 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
28 | },
29 | })
30 | if err != nil {
31 | return err
32 | }
33 |
34 | cmd.Printf("Created new capsule '%v'\n", res.Msg.GetCapsuleId())
35 | return nil
36 | }
37 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/root/delete.go:
--------------------------------------------------------------------------------
1 | package root
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/capsule"
8 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, _ []string) error {
13 | if _, err := c.Rig.Capsule().Delete(ctx, &connect.Request[capsule.DeleteRequest]{
14 | Msg: &capsule.DeleteRequest{
15 | CapsuleId: capsule_cmd.CapsuleID,
16 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
17 | },
18 | }); err != nil {
19 | return err
20 | }
21 |
22 | cmd.Println("Delete capsule", capsule_cmd.CapsuleID)
23 | return nil
24 | }
25 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/root/logs.go:
--------------------------------------------------------------------------------
1 | package root
2 |
3 | import (
4 | "context"
5 | "time"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/rigdev/rig-go-api/api/v1/capsule"
9 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
10 | "github.com/spf13/cobra"
11 | "google.golang.org/protobuf/types/known/durationpb"
12 | )
13 |
14 | func (c *Cmd) logs(ctx context.Context, _ *cobra.Command, _ []string) error {
15 | request := &capsule.LogsRequest{
16 | CapsuleId: capsule_cmd.CapsuleID,
17 | Follow: follow,
18 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
19 | EnvironmentId: c.Scope.GetCurrentContext().GetEnvironment(),
20 | PreviousContainers: previousContainers,
21 | }
22 |
23 | if since != "" {
24 | duration, err := time.ParseDuration(since)
25 | if err != nil {
26 | return err
27 | }
28 | request.Since = durationpb.New(duration)
29 | }
30 |
31 | stream, err := c.Rig.Capsule().Logs(ctx, connect.NewRequest(request))
32 | if err != nil {
33 | return err
34 | }
35 |
36 | return capsule_cmd.PrintLogs(stream)
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/capsule/root/stop.go:
--------------------------------------------------------------------------------
1 | package root
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/capsule"
8 | capsule_cmd "github.com/rigdev/rig/cmd/rig/cmd/capsule"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) stop(ctx context.Context, cmd *cobra.Command, _ []string) error {
13 | currentRollout, err := capsule_cmd.GetCurrentRollout(ctx, c.Rig, c.Scope)
14 | if err != nil {
15 | return err
16 | }
17 |
18 | if _, err := c.Rig.Capsule().StopRollout(ctx, &connect.Request[capsule.StopRolloutRequest]{
19 | Msg: &capsule.StopRolloutRequest{
20 | CapsuleId: capsule_cmd.CapsuleID,
21 | RolloutId: currentRollout.GetRolloutId(),
22 | ProjectId: c.Scope.GetCurrentContext().GetProject(),
23 | },
24 | }); err != nil {
25 | return err
26 | }
27 |
28 | cmd.Println("rollout stopped")
29 |
30 | return nil
31 | }
32 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/cluster/getconfig.go:
--------------------------------------------------------------------------------
1 | package cluster
2 |
3 | import (
4 | "context"
5 | "fmt"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/rigdev/rig-go-api/api/v1/cluster"
9 | "github.com/rigdev/rig/cmd/common"
10 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
11 | "github.com/spf13/cobra"
12 | "gopkg.in/yaml.v3"
13 | )
14 |
15 | func (c *Cmd) get(ctx context.Context, _ *cobra.Command, _ []string) error {
16 | resp, err := c.Rig.Cluster().GetConfig(ctx, connect.NewRequest(&cluster.GetConfigRequest{
17 | EnvironmentId: c.Scope.GetCurrentContext().GetEnvironment(),
18 | }))
19 | if err != nil {
20 | return err
21 | }
22 | config := resp.Msg
23 |
24 | if flags.Flags.OutputType != common.OutputTypePretty {
25 | return common.FormatPrint(config, flags.Flags.OutputType)
26 | }
27 |
28 | // Yes, pretty-printing is also just yaml for this one
29 | bytes, err := yaml.Marshal(config)
30 | if err != nil {
31 | return err
32 | }
33 |
34 | fmt.Println(string(bytes))
35 |
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/cluster/list.go:
--------------------------------------------------------------------------------
1 | package cluster
2 |
3 | import (
4 | "context"
5 | "fmt"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/rigdev/rig-go-api/api/v1/cluster"
9 | "github.com/rigdev/rig/cmd/common"
10 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
11 | "github.com/spf13/cobra"
12 | "gopkg.in/yaml.v3"
13 | )
14 |
15 | func (c *Cmd) list(ctx context.Context, _ *cobra.Command, _ []string) error {
16 | resp, err := c.Rig.Cluster().List(ctx, connect.NewRequest(&cluster.ListRequest{}))
17 | if err != nil {
18 | return err
19 | }
20 |
21 | var clusters []string
22 | for _, c := range resp.Msg.GetClusters() {
23 | clusters = append(clusters, c.GetClusterId())
24 | }
25 |
26 | if flags.Flags.OutputType != common.OutputTypePretty {
27 | return common.FormatPrint(clusters, flags.Flags.OutputType)
28 | }
29 |
30 | // Yes, pretty-printing is also just yaml for this one
31 | bytes, err := yaml.Marshal(clusters)
32 | if err != nil {
33 | return err
34 | }
35 |
36 | fmt.Println(string(bytes))
37 |
38 | return nil
39 | }
40 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/config/current_context.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import "github.com/spf13/cobra"
4 |
5 | func (c *CmdWScope) currentContext(cmd *cobra.Command, _ []string) error {
6 | cmd.Println(c.Scope.GetCurrentContext().Name)
7 | return nil
8 | }
9 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/config/delete.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "github.com/rigdev/rig/pkg/errors"
5 | "github.com/spf13/cobra"
6 | )
7 |
8 | func (c *CmdNoScope) delete(cmd *cobra.Command, args []string) error {
9 | var ctx string
10 | var err error
11 | if len(args) == 0 {
12 | ctx, err = c.Cfg.PromptForContext()
13 | if err != nil {
14 | return err
15 | }
16 | } else {
17 | ctx = args[0]
18 | }
19 |
20 | deleted := c.Cfg.DeleteContext(ctx)
21 | if !deleted {
22 | return errors.NotFoundErrorf("context %s not found", ctx)
23 | }
24 | err = c.Cfg.Save()
25 | if err != nil {
26 | return err
27 | }
28 | cmd.Println("Context deleted")
29 | return nil
30 | }
31 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/config/init.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
5 | "github.com/spf13/cobra"
6 | )
7 |
8 | func (c *CmdNoScope) init(_ *cobra.Command, _ []string) error {
9 | if c.PromptInfo.ContextCreation {
10 | return nil
11 | }
12 |
13 | return c.Cfg.CreateContextAndSave(contextName, flags.Flags.Host, bool(c.Interactive))
14 | }
15 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/config/use_context.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "github.com/spf13/cobra"
5 | )
6 |
7 | func (c *CmdNoScope) useContext(_ *cobra.Command, args []string) error {
8 | if len(args) > 0 {
9 | return c.Cfg.UseContext(args[0])
10 | }
11 | return c.Cfg.SelectContext()
12 | }
13 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/config/view_config.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "github.com/rigdev/rig/cmd/common"
5 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
6 | "github.com/spf13/cobra"
7 | )
8 |
9 | func (c *CmdNoScope) viewConfig(cmd *cobra.Command, _ []string) error {
10 | var outputType common.OutputType
11 | if flags.Flags.OutputType == common.OutputTypePretty {
12 | outputType = common.OutputTypeYAML
13 | } else {
14 | outputType = flags.Flags.OutputType
15 | }
16 |
17 | var toPrint string
18 | var err error
19 | if minify {
20 | toPrint, err = common.Format(c.Cfg.Minify(), outputType)
21 | if err != nil {
22 | return err
23 | }
24 | } else {
25 | toPrint, err = common.Format(c.Cfg, outputType)
26 | if err != nil {
27 | return err
28 | }
29 | }
30 |
31 | cmd.Println(toPrint)
32 | return nil
33 | }
34 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/dev/kind/config.yaml:
--------------------------------------------------------------------------------
1 | kind: Cluster
2 | apiVersion: kind.x-k8s.io/v1alpha4
3 | nodes:
4 | - role: control-plane
5 | extraPortMappings:
6 | - containerPort: 30000
7 | hostPort: 30000
8 | listenAddress: "127.0.0.1"
9 | protocol: TCP
10 | - containerPort: 30047
11 | hostPort: 4747
12 | listenAddress: "127.0.0.1"
13 | protocol: TCP
14 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/dev/kind/registry.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | labels:
5 | run: registry
6 | name: registry
7 | namespace: rig-system
8 | spec:
9 | replicas: 1
10 | selector:
11 | matchLabels:
12 | run: registry
13 | template:
14 | metadata:
15 | labels:
16 | run: registry
17 | spec:
18 | containers:
19 | - name: registry
20 | image: registry:2
21 | ports:
22 | - containerPort: 5000
23 | ---
24 | apiVersion: v1
25 | kind: Service
26 | metadata:
27 | name: registry
28 | namespace: rig-system
29 | spec:
30 | type: NodePort
31 | selector:
32 | run: registry
33 | ports:
34 | - name: registry-tcp
35 | nodePort: 30000
36 | protocol: TCP
37 | port: 5000
38 | targetPort: 5000
39 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/environment/delete.go:
--------------------------------------------------------------------------------
1 | package environment
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/environment"
8 | "github.com/spf13/cobra"
9 | )
10 |
11 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
12 | environmentID := args[0]
13 |
14 | req := &environment.DeleteRequest{
15 | EnvironmentId: environmentID,
16 | Force: force,
17 | }
18 |
19 | _, err := c.Rig.Environment().Delete(ctx, &connect.Request[environment.DeleteRequest]{Msg: req})
20 | if err != nil {
21 | return err
22 | }
23 |
24 | cmd.Printf("Successfully deleted environment '%s'\n", environmentID)
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/environment/remove_project.go:
--------------------------------------------------------------------------------
1 | package environment
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/environment"
8 | "github.com/spf13/cobra"
9 | )
10 |
11 | func (c *Cmd) removeProject(ctx context.Context, cmd *cobra.Command, args []string) error {
12 | environmentID := args[0]
13 | projectID := args[1]
14 |
15 | req := &environment.UpdateRequest{
16 | EnvironmentId: environmentID,
17 | Updates: []*environment.Update{
18 | {
19 | Field: &environment.Update_RemoveProject{
20 | RemoveProject: projectID,
21 | },
22 | },
23 | },
24 | }
25 |
26 | _, err := c.Rig.Environment().Update(ctx, connect.NewRequest(req))
27 | if err != nil {
28 | return err
29 | }
30 |
31 | cmd.Printf("Successfully removed project %s from environment '%s'\n", projectID, environmentID)
32 | return nil
33 | }
34 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/flags/flags.go:
--------------------------------------------------------------------------------
1 | package flags
2 |
3 | import (
4 | "os"
5 |
6 | "github.com/rigdev/rig/cmd/common"
7 | )
8 |
9 | //nolint:revive
10 | type FlagsStruct struct {
11 | OutputType common.OutputType
12 | NonInteractive bool
13 | Environment string
14 | Project string
15 | BasicAuth bool
16 | Host string
17 | Context string
18 | }
19 |
20 | var Flags FlagsStruct
21 |
22 | func InitFlags() {
23 | Flags = FlagsStruct{
24 | OutputType: common.OutputTypePretty,
25 | NonInteractive: false,
26 | Environment: os.Getenv("RIG_ENVIRONMENT"),
27 | Project: os.Getenv("RIG_PROJECT"),
28 | BasicAuth: false,
29 | Host: os.Getenv("RIG_HOST"),
30 | Context: "",
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/git/setup.go:
--------------------------------------------------------------------------------
1 | package git
2 |
3 | import (
4 | "github.com/rigdev/rig-go-sdk"
5 | "github.com/rigdev/rig/cmd/common"
6 | "github.com/rigdev/rig/cmd/rig/services/auth"
7 | "github.com/rigdev/rig/pkg/cli"
8 | "github.com/spf13/cobra"
9 | "go.uber.org/fx"
10 | )
11 |
12 | type Cmd struct {
13 | fx.In
14 |
15 | Rig rig.Client
16 | Prompter common.Prompter
17 | }
18 |
19 | var cmd Cmd
20 |
21 | func initCmd(c Cmd) {
22 | cmd.Rig = c.Rig
23 | cmd.Prompter = c.Prompter
24 | }
25 |
26 | func Setup(parent *cobra.Command, s *cli.SetupContext) {
27 | git := &cobra.Command{
28 | Use: "git",
29 | Short: "Manage git backing of capsules",
30 | Annotations: map[string]string{
31 | auth.OmitProject: "",
32 | auth.OmitEnvironment: "",
33 | auth.OmitUser: "",
34 | },
35 | PersistentPreRunE: s.MakeInvokePreRunE(initCmd),
36 | GroupID: common.ManagementGroupID,
37 | }
38 |
39 | status := &cobra.Command{
40 | Use: "status",
41 | Short: "Get the status of the git backing",
42 | Annotations: map[string]string{
43 | auth.OmitProject: "",
44 | auth.OmitEnvironment: "",
45 | auth.OmitUser: "",
46 | },
47 | RunE: cli.CtxWrap(cmd.status),
48 | }
49 | git.AddCommand(status)
50 |
51 | parent.AddCommand(git)
52 | }
53 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/group/create.go:
--------------------------------------------------------------------------------
1 | package group
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/group"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) create(ctx context.Context, cmd *cobra.Command, args []string) error {
13 | var err error
14 | groupID := ""
15 | if len(args) == 0 {
16 | groupID, err = c.Prompter.Input("Group ID:", common.ValidateNonEmptyOpt)
17 | if err != nil {
18 | return err
19 | }
20 | } else {
21 | groupID = args[0]
22 | }
23 |
24 | updates := []*group.Update{
25 | {
26 | Field: &group.Update_GroupId{
27 | GroupId: groupID,
28 | },
29 | },
30 | }
31 |
32 | res, err := c.Rig.Group().Create(ctx, &connect.Request[group.CreateRequest]{
33 | Msg: &group.CreateRequest{
34 | Initializers: updates,
35 | },
36 | })
37 | if err != nil {
38 | return err
39 | }
40 |
41 | cmd.Println("Created group", res.Msg.GetGroup().GetGroupId())
42 | return nil
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/group/delete.go:
--------------------------------------------------------------------------------
1 | package group
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/group"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
13 | identifier := ""
14 | if len(args) > 0 {
15 | identifier = args[0]
16 | }
17 |
18 | g, uid, err := common.GetGroup(ctx, identifier, c.Rig, c.Prompter)
19 | if err != nil {
20 | return err
21 | }
22 |
23 | _, err = c.Rig.Group().Delete(ctx, &connect.Request[group.DeleteRequest]{
24 | Msg: &group.DeleteRequest{
25 | GroupId: uid,
26 | },
27 | })
28 | if err != nil {
29 | return err
30 | }
31 |
32 | cmd.Printf("Group %s deleted\n", g.GetGroupId())
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/project/create.go:
--------------------------------------------------------------------------------
1 | package project
2 |
3 | import (
4 | "context"
5 |
6 | "github.com/spf13/cobra"
7 | )
8 |
9 | func (c *Cmd) create(ctx context.Context, _ *cobra.Command, args []string) error {
10 | var id string
11 | if len(args) > 0 {
12 | id = args[0]
13 | }
14 | return c.Auth.CreateProject(ctx, id, &useProject)
15 | }
16 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/project/delete.go:
--------------------------------------------------------------------------------
1 | package project
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/project"
8 | "github.com/spf13/cobra"
9 | )
10 |
11 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
12 | var projectID string
13 | if len(args) > 0 {
14 | projectID = args[0]
15 | } else {
16 | projectID = c.Scope.GetCurrentContext().GetProject()
17 | }
18 |
19 | req := &project.DeleteRequest{
20 | ProjectId: projectID,
21 | }
22 |
23 | _, err := c.Rig.Project().Delete(ctx, &connect.Request[project.DeleteRequest]{Msg: req})
24 | if err != nil {
25 | return err
26 | }
27 |
28 | cmd.Println("Successfully deleted project")
29 | return nil
30 | }
31 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/project/list.go:
--------------------------------------------------------------------------------
1 | package project
2 |
3 | import (
4 | "context"
5 | "fmt"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/jedib0t/go-pretty/v6/table"
9 | "github.com/rigdev/rig-go-api/api/v1/project"
10 | "github.com/rigdev/rig-go-api/model"
11 | "github.com/rigdev/rig/cmd/common"
12 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
13 | "github.com/spf13/cobra"
14 | )
15 |
16 | func (c *Cmd) list(ctx context.Context, cmd *cobra.Command, _ []string) error {
17 | req := &project.ListRequest{
18 | Pagination: &model.Pagination{
19 | Offset: uint32(offset),
20 | Limit: uint32(limit),
21 | },
22 | }
23 |
24 | resp, err := c.Rig.Project().List(ctx, &connect.Request[project.ListRequest]{Msg: req})
25 | if err != nil {
26 | return err
27 | }
28 |
29 | if flags.Flags.OutputType != common.OutputTypePretty {
30 | return common.FormatPrint(resp.Msg.GetProjects(), flags.Flags.OutputType)
31 | }
32 |
33 | t := table.NewWriter()
34 | t.AppendHeader(table.Row{fmt.Sprintf("Projects (%d)", resp.Msg.GetTotal()), "ID", "Created At"})
35 | for i, p := range resp.Msg.GetProjects() {
36 | t.AppendRow(table.Row{i + 1, p.GetProjectId(), p.GetCreatedAt().AsTime().Format("2006-01-02 15:04:05")})
37 | }
38 | cmd.Println(t.Render())
39 | return nil
40 | }
41 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/role/delete.go:
--------------------------------------------------------------------------------
1 | package role
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/role"
8 | "github.com/spf13/cobra"
9 | )
10 |
11 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
12 | roleID := ""
13 | if len(args) > 0 {
14 | roleID = args[0]
15 | } else {
16 | resp, err := c.Rig.Role().List(ctx, connect.NewRequest(&role.ListRequest{}))
17 | if err != nil {
18 | return err
19 | }
20 |
21 | var roleIDs []string
22 | for _, r := range resp.Msg.GetRoles() {
23 | roleIDs = append(roleIDs, r.GetRoleId())
24 | }
25 |
26 | _, roleID, err = c.Prompter.Select("Select role to delete", roleIDs)
27 | if err != nil {
28 | return err
29 | }
30 | }
31 |
32 | if _, err := c.Rig.Role().Delete(ctx, connect.NewRequest(&role.DeleteRequest{
33 | RoleId: roleID,
34 | })); err != nil {
35 | return err
36 | }
37 |
38 | cmd.Println("Deleted role:", roleID)
39 | return nil
40 | }
41 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/serviceaccount/create.go:
--------------------------------------------------------------------------------
1 | package serviceaccount
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/service_account"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) create(ctx context.Context, cmd *cobra.Command, args []string) error {
13 | var name string
14 | var err error
15 | if len(args) < 1 {
16 | name, err = c.Prompter.Input("Name:", common.ValidateNonEmptyOpt)
17 | if err != nil {
18 | return err
19 | }
20 | } else {
21 | name = args[0]
22 | }
23 |
24 | if role == "" {
25 | _, role, err = c.Prompter.Select("What is the role of the user?",
26 | []string{"admin", "owner", "developer", "viewer"})
27 | if err != nil {
28 | return err
29 | }
30 | }
31 |
32 | resp, err := c.Rig.ServiceAccount().Create(ctx, &connect.Request[service_account.CreateRequest]{
33 | Msg: &service_account.CreateRequest{
34 | Name: name,
35 | InitialGroupId: role,
36 | },
37 | })
38 | if err != nil {
39 | return err
40 | }
41 |
42 | cmd.Print("Service Account created\n")
43 | cmd.Printf("ID: %s\n", resp.Msg.GetClientId())
44 | cmd.Printf("Secret: %s\n", resp.Msg.GetClientSecret())
45 |
46 | return nil
47 | }
48 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/serviceaccount/delete.go:
--------------------------------------------------------------------------------
1 | package serviceaccount
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/service_account"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/rigdev/rig/pkg/uuid"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
14 | var serviceAccountID string
15 | var err error
16 |
17 | if len(args) > 0 {
18 | serviceAccountID = args[0]
19 | }
20 |
21 | if serviceAccountID == "" {
22 | serviceAccountID, err = c.Prompter.Input("Service Account ID:", common.ValidateNonEmptyOpt)
23 | if err != nil {
24 | return err
25 | }
26 | }
27 |
28 | _, err = uuid.Parse(serviceAccountID)
29 | if err != nil {
30 | return err
31 | }
32 |
33 | _, err = c.Rig.ServiceAccount().Delete(ctx, &connect.Request[service_account.DeleteRequest]{
34 | Msg: &service_account.DeleteRequest{
35 | ServiceAccountId: serviceAccountID,
36 | },
37 | })
38 | if err != nil {
39 | return err
40 | }
41 |
42 | cmd.Println("Credential deleted")
43 | return nil
44 | }
45 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/serviceaccount/list.go:
--------------------------------------------------------------------------------
1 | package serviceaccount
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/jedib0t/go-pretty/v6/table"
8 | "github.com/rigdev/rig-go-api/api/v1/service_account"
9 | "github.com/rigdev/rig/cmd/common"
10 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
11 | "github.com/spf13/cobra"
12 | )
13 |
14 | func (c *Cmd) list(ctx context.Context, cmd *cobra.Command, _ []string) error {
15 | resp, err := c.Rig.ServiceAccount().List(ctx, &connect.Request[service_account.ListRequest]{
16 | Msg: &service_account.ListRequest{},
17 | })
18 | if err != nil {
19 | return err
20 | }
21 |
22 | serviceAccounts := resp.Msg.GetServiceAccounts()
23 |
24 | if flags.Flags.OutputType != common.OutputTypePretty {
25 | return common.FormatPrint(serviceAccounts, flags.Flags.OutputType)
26 | }
27 |
28 | t := table.NewWriter()
29 | t.AppendHeader(table.Row{"Service Accounts", "Name", "ID", "ClientID"})
30 | for i, cred := range serviceAccounts {
31 | t.AppendRow(table.Row{i + 1, cred.GetName(), cred.GetServiceAccountId(), cred.GetClientId()})
32 | }
33 |
34 | cmd.Println(t.Render())
35 |
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/settings/configuration.go:
--------------------------------------------------------------------------------
1 | package settings
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | settings_api "github.com/rigdev/rig-go-api/api/v1/settings"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) configuration(ctx context.Context, _ *cobra.Command, _ []string) error {
14 | resp, err := c.Rig.Settings().GetConfiguration(ctx, connect.NewRequest(&settings_api.GetConfigurationRequest{}))
15 | if err != nil {
16 | return err
17 | }
18 |
19 | if flags.Flags.OutputType != common.OutputTypePretty {
20 | return common.FormatPrint(resp.Msg.GetConfiguration(), flags.Flags.OutputType)
21 | }
22 |
23 | return common.FormatPrint(resp.Msg.GetConfiguration(), common.OutputTypeYAML)
24 | }
25 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/settings/get.go:
--------------------------------------------------------------------------------
1 | package settings
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | settings_api "github.com/rigdev/rig-go-api/api/v1/settings"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | func (c *Cmd) get(ctx context.Context, cmd *cobra.Command, _ []string) error {
14 | resp, err := c.Rig.Settings().GetSettings(ctx, connect.NewRequest(&settings_api.GetSettingsRequest{}))
15 | if err != nil {
16 | return err
17 | }
18 |
19 | if resp.Msg.GetSettings() == nil {
20 | cmd.Println("No settings set")
21 | return nil
22 | }
23 |
24 | if flags.Flags.OutputType != common.OutputTypePretty {
25 | return common.FormatPrint(resp.Msg.GetSettings(), flags.Flags.OutputType)
26 | }
27 |
28 | return common.FormatPrint(resp.Msg.GetSettings(), common.OutputTypeYAML)
29 | }
30 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/user/delete.go:
--------------------------------------------------------------------------------
1 | package user
2 |
3 | import (
4 | "context"
5 |
6 | "connectrpc.com/connect"
7 | "github.com/rigdev/rig-go-api/api/v1/user"
8 | "github.com/rigdev/rig/cmd/common"
9 | "github.com/spf13/cobra"
10 | )
11 |
12 | func (c *Cmd) delete(ctx context.Context, cmd *cobra.Command, args []string) error {
13 | identifier := ""
14 | if len(args) > 0 {
15 | identifier = args[0]
16 | }
17 | _, id, err := common.GetUser(ctx, identifier, c.Rig, c.Prompter)
18 | if err != nil {
19 | return err
20 | }
21 |
22 | _, err = c.Rig.User().Delete(ctx, connect.NewRequest(&user.DeleteRequest{
23 | UserId: id,
24 | }))
25 | if err != nil {
26 | return err
27 | }
28 |
29 | cmd.Printf("User deleted\n")
30 | return nil
31 | }
32 |
--------------------------------------------------------------------------------
/cmd/rig/cmd/user/list.go:
--------------------------------------------------------------------------------
1 | package user
2 |
3 | import (
4 | "context"
5 | "fmt"
6 |
7 | "connectrpc.com/connect"
8 | "github.com/jedib0t/go-pretty/v6/table"
9 | "github.com/rigdev/rig-go-api/api/v1/user"
10 | "github.com/rigdev/rig-go-api/model"
11 | "github.com/rigdev/rig/cmd/common"
12 | "github.com/rigdev/rig/cmd/rig/cmd/flags"
13 | "github.com/spf13/cobra"
14 | )
15 |
16 | func (c *Cmd) list(ctx context.Context, cmd *cobra.Command, _ []string) error {
17 | req := &user.ListRequest{
18 | Pagination: &model.Pagination{
19 | Offset: uint32(offset),
20 | Limit: uint32(limit),
21 | },
22 | }
23 | resp, err := c.Rig.User().List(ctx, &connect.Request[user.ListRequest]{Msg: req})
24 | if err != nil {
25 | return err
26 | }
27 |
28 | if flags.Flags.OutputType != common.OutputTypePretty {
29 | return common.FormatPrint(resp.Msg.GetUsers(), flags.Flags.OutputType)
30 | }
31 |
32 | t := table.NewWriter()
33 | t.AppendHeader(table.Row{fmt.Sprintf("Users (%d)", resp.Msg.GetTotal()), "Identifier", "ID"})
34 | for i, u := range resp.Msg.GetUsers() {
35 | t.AppendRow(table.Row{i + 1, u.GetPrintableName(), u.GetUserId()})
36 | }
37 | cmd.Println(t.Render())
38 | return nil
39 | }
40 |
--------------------------------------------------------------------------------
/cmd/rig/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "os"
6 |
7 | "github.com/rigdev/rig/cmd/rig/cmd"
8 | "github.com/rigdev/rig/pkg/cli"
9 | "github.com/rigdev/rig/pkg/errors"
10 | "go.uber.org/dig"
11 | )
12 |
13 | func main() {
14 | if err := cmd.Run(cli.StandardSetupContext); err != nil {
15 | fmt.Println(errors.MessageOf(dig.RootCause(err)))
16 | os.Exit(1)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/configs/rig-operator-config.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: config.rig.dev/v1alpha1
2 | kind: OperatorConfig
3 |
4 | webhooksEnabled: true
5 | devModeEnabled: false
6 | leaderElectionEnabled: true
7 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: rig-operator
3 | description: rig-operator implements the controller logic for the Rig CRDs
4 |
5 | # A chart can be either an 'application' or a 'library' chart.
6 | #
7 | # Application charts are a collection of templates that can be packaged into versioned archives
8 | # to be deployed.
9 | #
10 | # Library charts provide useful utilities or functions for the chart developer. They're included as
11 | # a dependency of application charts to inject those utilities and functions into the rendering
12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed.
13 | type: application
14 |
15 | # This is the chart version. This version number should be incremented each time you make changes
16 | # to the chart and its templates, including the app version.
17 | # Versions are expected to follow Semantic Versioning (https://semver.org/)
18 | version: 1.0.44
19 |
20 | # This is the version number of the application being deployed. This version number should be
21 | # incremented each time you make changes to the application. Versions are not expected to
22 | # follow Semantic Versioning. They should reflect the version the application is using.
23 | # It is recommended to use it with quotes.
24 | appVersion: "1.12.7"
25 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/_config.tpl:
--------------------------------------------------------------------------------
1 | {{/*
2 | Render configfile
3 | */}}
4 | {{- define "rig-operator.config" -}}
5 | apiVersion: config.rig.dev/v1alpha1
6 | kind: OperatorConfig
7 | {{ .Values.config | toYaml }}
8 | {{- end }}
9 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/apicheck/rbac.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.config.webhooksEnabled .Values.rbac.create -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: Role
4 | metadata:
5 | name: {{ include "rig-operator.apicheck.fullname" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | annotations:
8 | helm.sh/hook: post-install,post-upgrade
9 | helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
10 | rules:
11 | - apiGroups: ["rig.dev"]
12 | resources: ["capsules"]
13 | verbs: ["create"]
14 | ---
15 | apiVersion: rbac.authorization.k8s.io/v1
16 | kind: RoleBinding
17 | metadata:
18 | name: {{ include "rig-operator.apicheck.fullname" . }}
19 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
20 | annotations:
21 | helm.sh/hook: post-install,post-upgrade
22 | helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
23 | roleRef:
24 | apiGroup: rbac.authorization.k8s.io
25 | kind: Role
26 | name: {{ include "rig-operator.apicheck.fullname" . }}
27 | subjects:
28 | - kind: ServiceAccount
29 | name: {{ include "rig-operator.apicheck.serviceAccountName" . }}
30 | namespace: {{ .Release.Namespace }}
31 | {{- end -}}
32 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/apicheck/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.config.webhooksEnabled .Values.apicheck.serviceAccount.create -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ include "rig-operator.apicheck.serviceAccountName" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | annotations:
8 | helm.sh/hook: post-install,post-upgrade
9 | helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
10 | {{- end -}}
11 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/certgen/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.config.webhooksEnabled .Values.certgen.serviceAccount.create (not .Values.certManager.enabled) -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ include "rig-operator.certgen.serviceAccountName" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | annotations:
8 | helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
9 | helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
10 | {{- end -}}
11 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/certificate.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.config.webhooksEnabled .Values.certManager.enabled -}}
2 | apiVersion: cert-manager.io/v1
3 | kind: Issuer
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}-webhook
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | spec:
8 | selfSigned: {}
9 | ---
10 | apiVersion: cert-manager.io/v1
11 | kind: Certificate
12 | metadata:
13 | name: {{ include "rig-operator.fullname" . }}-webhook
14 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
15 | spec:
16 | dnsNames:
17 | - {{ include "rig-operator.fullname" . }}.{{ .Release.Namespace }}.svc
18 | - {{ include "rig-operator.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
19 | issuerRef:
20 | kind: Issuer
21 | name: {{ include "rig-operator.fullname" . }}-webhook
22 | secretName: {{ include "rig-operator.fullname" . }}-webhook-tls
23 | {{- end -}}
24 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/clusterrolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | subjects:
8 | - kind: ServiceAccount
9 | name: {{ include "rig-operator.serviceAccountName" . }}
10 | namespace: {{ .Release.Namespace }}
11 | roleRef:
12 | kind: ClusterRole
13 | name: {{ include "rig-operator.fullname" . }}
14 | apiGroup: rbac.authorization.k8s.io
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/clusterrolebinding_platform.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.platform.create_token -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | name: {{ .Values.rbac.platform.service_account }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | subjects:
8 | - kind: ServiceAccount
9 | name: {{ .Values.rbac.platform.service_account }}
10 | namespace: {{ .Release.Namespace }}
11 | roleRef:
12 | kind: ClusterRole
13 | name: {{ .Values.rbac.platform.service_account }}
14 | apiGroup: rbac.authorization.k8s.io
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/role.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: Role
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | rules:
8 | - apiGroups:
9 | - coordination.k8s.io
10 | resources:
11 | - leases
12 | verbs:
13 | - "*"
14 | - apiGroups:
15 | - ""
16 | resources:
17 | - events
18 | verbs:
19 | - create
20 | - patch
21 | {{- end }}
22 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/rolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: RoleBinding
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | subjects:
8 | - kind: ServiceAccount
9 | name: {{ include "rig-operator.serviceAccountName" . }}
10 | namespace: {{ .Release.Namespace }}
11 | roleRef:
12 | kind: Role
13 | name: {{ include "rig-operator.fullname" . }}
14 | apiGroup: rbac.authorization.k8s.io
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/secret.yaml:
--------------------------------------------------------------------------------
1 | {{- if not .Values.secretName -}}
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | data:
8 | config.yaml: {{ include "rig-operator.config" . | b64enc }}
9 | {{- end -}}
10 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/secret_platform.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.platform.create_token -}}
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ .Values.rbac.platform.service_account }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | annotations:
8 | kubernetes.io/service-account.name: {{ .Values.rbac.platform.service_account }}
9 | type: kubernetes.io/service-account-token
10 | {{- end -}}
11 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ include "rig-operator.fullname" . }}
5 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
6 | spec:
7 | type: ClusterIP
8 | ports:
9 | {{- if .Values.config.webhooksEnabled }}
10 | - name: webhooks
11 | port: 9443
12 | targetPort: webhooks
13 | protocol: TCP
14 | {{- end }}
15 | - name: grpc
16 | port: 9000
17 | targetPort: grpc
18 | protocol: TCP
19 | - name: metrics
20 | port: 8080
21 | targetPort: metrics
22 | protocol: TCP
23 | selector: {{ include "rig-operator.selectorLabels" . | nindent 4 }}
24 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.serviceAccount.create -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ include "rig-operator.serviceAccountName" . }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | {{- end }}
8 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/serviceaccount_platform.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.platform.create_token -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ .Values.rbac.platform.service_account }}
6 | labels: {{ include "rig-operator.labels" . | nindent 4 }}
7 | {{- end }}
8 |
--------------------------------------------------------------------------------
/deploy/charts/rig-operator/templates/servicemonitor.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.serviceMonitor.enabled }}
2 | apiVersion: monitoring.coreos.com/v1
3 | kind: ServiceMonitor
4 | metadata:
5 | name: {{ include "rig-operator.fullname" . }}
6 | labels:
7 | {{- include "rig-operator.labels" . | nindent 4 }}
8 | {{- if .Values.serviceMonitor.labels }}
9 | {{ .Values.serviceMonitor.labels | toYaml }}
10 | {{- end }}
11 | spec:
12 | selector:
13 | matchLabels: {{- include "rig-operator.selectorLabels" . | nindent 6 }}
14 | endpoints:
15 | - port: metrics
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: rig-platform
3 | description: Rig application platform for Kubernetes.
4 | home: https://github.com/rigdev/rig
5 |
6 | # A chart can be either an 'application' or a 'library' chart.
7 | #
8 | # Application charts are a collection of templates that can be packaged into versioned archives
9 | # to be deployed.
10 | #
11 | # Library charts provide useful utilities or functions for the chart developer. They're included as
12 | # a dependency of application charts to inject those utilities and functions into the rendering
13 | # pipeline. Library charts do not define any templates and therefore cannot be deployed.
14 | type: application
15 |
16 | # This is the chart version. This version number should be incremented each time you make changes
17 | # to the chart and its templates, including the app version.
18 | # Versions are expected to follow Semantic Versioning (https://semver.org/)
19 | version: 1.0.70
20 |
21 | # This is the version number of the application being deployed. This version number should be
22 | # incremented each time you make changes to the application. Versions are not expected to
23 | # follow Semantic Versioning. They should reflect the version the application is using.
24 | # It is recommended to use it with quotes.
25 | appVersion: "1.6.26"
26 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | Rig installed and can be accessed by
2 |
3 | {{- if .Values.ingress.host }}
4 | Public URL:
5 | visit https://{{ .Values.ingress.host}}
6 | {{- end }}
7 |
8 | {{- if .Values.loadBalancer.enabled }}
9 | Kind:
10 | visit http://localhost:4747
11 | {{- else }}
12 | Port-forward:
13 | kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "rig-platform.fullname" . }} 4747
14 | visit http://localhost:4747
15 | {{- end }}
16 |
17 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/clusterrolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | name: {{ include "rig-platform.fullname" . }}
6 | labels: {{ include "rig-platform.labels" . | nindent 4 }}
7 | subjects:
8 | - kind: ServiceAccount
9 | name: {{ include "rig-platform.serviceAccountName" . }}
10 | namespace: {{ .Release.Namespace }}
11 | roleRef:
12 | kind: ClusterRole
13 | name: {{ include "rig-platform.fullname" . }}
14 | apiGroup: rbac.authorization.k8s.io
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/configmap.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: {{ include "rig-platform.fullname" . }}-config
5 | labels: {{ include "rig-platform.labels" . | nindent 4 }}
6 | data:
7 | config.yaml: | {{ include "rig-platform.config" . | nindent 4 }}
8 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/postgres/secret.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.postgres.enabled -}}
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ include "rig-platform.fullname" . }}-postgres
6 | labels: {{ include "rig-platform.postgres.labels" . | nindent 4 }}
7 | data:
8 | POSTGRES_USER: {{ "postgres" | b64enc }}
9 | POSTGRES_PASSWORD: {{ "postgres" | b64enc }}
10 | POSTGRES_DB: {{ "rig" | b64enc }}
11 | {{- end -}}
12 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/postgres/service.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.postgres.enabled }}
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: {{ include "rig-platform.fullname" . }}-postgres
6 | labels: {{ include "rig-platform.postgres.labels" . | nindent 4 }}
7 | spec:
8 | ports:
9 | - port: 5432
10 | targetPort: postgres
11 | protocol: TCP
12 | name: postgres
13 | selector: {{ include "rig-platform.postgres.selectorLabels" . | nindent 4 }}
14 | ---
15 | apiVersion: v1
16 | kind: Service
17 | metadata:
18 | name: {{ include "rig-platform.fullname" . }}-postgres-headless
19 | labels: {{ include "rig-platform.postgres.labels" . | nindent 4 }}
20 | spec:
21 | clusterIP: None
22 | ports:
23 | - port: 5432
24 | targetPort: postgres
25 | protocol: TCP
26 | name: postgres
27 | selector: {{ include "rig-platform.postgres.selectorLabels" . | nindent 4 }}
28 | {{- end }}
29 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/service.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.loadBalancer.enabled -}}
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: rig-platform-load-balancer
6 | spec:
7 | type: NodePort
8 | selector:
9 | rig.dev/capsule: rig-platform
10 | ports:
11 | - name: http
12 | port: {{ .Values.port }}
13 | nodePort: {{ .Values.loadBalancer.nodePort }}
14 | targetPort: http
15 | {{- end }}
16 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.serviceAccount.create -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ include "rig-platform.serviceAccountName" . }}
6 | labels: {{ include "rig-platform.labels" . | nindent 4 }}
7 | {{- end }}
8 |
--------------------------------------------------------------------------------
/deploy/charts/rig-platform/templates/tests/test-connection.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: "{{ include "rig-platform.fullname" . }}-test-connection"
5 | labels:
6 | {{- include "rig-platform.labels" . | nindent 4 }}
7 | annotations:
8 | "helm.sh/hook": test
9 | spec:
10 | containers:
11 | - name: wget
12 | image: busybox
13 | command: ['wget']
14 | args: ['{{ include "rig-platform.fullname" . }}:{{ .Values.port }}']
15 | restartPolicy: Never
16 |
--------------------------------------------------------------------------------
/docs/.env:
--------------------------------------------------------------------------------
1 | SEGMENT_API_KEY=6hg2Pns6KKDV7j7xCmc9hlg8mroLjYYD
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | /build
6 |
7 | # Generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 | .vercel
22 | .vscode
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Website
2 |
3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4 |
5 | ### Installation
6 |
7 | ```
8 | $ npm install
9 | ```
10 |
11 | ### Local Development
12 |
13 | ```
14 | $ npm run start
15 | ```
16 |
17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18 |
19 | ### Build
20 |
21 | ```
22 | $ npm run build
23 | ```
24 |
25 | This command generates static content into the `build` directory and can be served using any static contents hosting service.
26 |
27 | ### Deployment
28 | Deploy to Vercel by pushing your commit or running:
29 |
30 | ```
31 | vercel
32 | ```
--------------------------------------------------------------------------------
/docs/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/config.yaml:
--------------------------------------------------------------------------------
1 | processor:
2 | # RE2 regular expressions describing types that should be excluded from the generated documentation.
3 | ignoreTypes:
4 | - "Capsule(List|Scale)$"
5 | - "(Capsule|Deployment)Status$"
6 | - "OwnedResource$"
7 | # RE2 regular expressions describing type fields that should be excluded from the generated documentation.
8 | ignoreFields:
9 | - "status$"
10 | - "scale$"
11 | - "TypeMeta$"
12 |
13 | render:
14 | # Version of Kubernetes to use when generating links to Kubernetes API documentation.
15 | kubernetesVersion: 1.28
16 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/platform.yaml:
--------------------------------------------------------------------------------
1 | processor: {}
2 | # RE2 regular expressions describing types that should be excluded from the generated documentation.
3 | # ignoreTypes:
4 | # - "Capsule(List|Scale)$"
5 | # - "(Capsule|Deployment)Status$"
6 | # - "OwnedResource$"
7 | # # RE2 regular expressions describing type fields that should be excluded from the generated documentation.
8 | # ignoreFields:
9 | # - "status$"
10 | # - "scale$"
11 | # - "TypeMeta$"
12 |
13 | render:
14 | # Version of Kubernetes to use when generating links to Kubernetes API documentation.
15 | kubernetesVersion: 1.28
16 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/templates/gv_details.tpl:
--------------------------------------------------------------------------------
1 | {{- define "gvDetails" -}}
2 | {{- $gv := . -}}
3 |
4 | # {{ $gv.GroupVersionString }}
5 |
6 | {{ $gv.Doc }}
7 |
8 | {{- if $gv.Kinds }}
9 | ## Resource Types
10 | {{- range $gv.SortedKinds }}
11 | - {{ $gv.TypeForKind . | markdownRenderTypeLink }}
12 | {{- end }}
13 | {{ end }}
14 |
15 | {{ range $gv.SortedTypes }}
16 | {{ template "type" . }}
17 | {{ end }}
18 |
19 | {{- end -}}
20 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/templates/gv_list.tpl:
--------------------------------------------------------------------------------
1 | {{- define "gvList" -}}
2 | {{- $groupVersions := . -}}
3 | ---
4 | custom_edit_url: null
5 | ---
6 |
7 | {{ range $groupVersions }}
8 | {{ template "gvDetails" . }}
9 | {{ end }}
10 |
11 |
12 |
13 |
14 | :::info generated from source code
15 | This page is generated based on go source code. If you have suggestions for
16 | improvements for this page, please open an issue at
17 | [github.com/rigdev/rig](https://github.com/rigdev/rig/issues/new), or a pull
18 | request with changes to [the go source
19 | files](https://github.com/rigdev/rig/tree/main/pkg/api).
20 | :::
21 |
22 | {{- end -}}
23 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/templates/type.tpl:
--------------------------------------------------------------------------------
1 | {{- define "type" -}}
2 | {{- $type := . -}}
3 | {{- if markdownShouldRenderType $type -}}
4 |
5 | ### {{ $type.Name }}
6 |
7 | {{ if $type.IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type.UnderlyingType }}_{{ end }}
8 |
9 | {{ $type.Doc }}
10 |
11 | {{ if $type.References -}}
12 | _Appears in:_
13 | {{- range $type.SortedReferences }}
14 | - {{ markdownRenderTypeLink . }}
15 | {{- end }}
16 | {{- end }}
17 |
18 | {{ if $type.Members -}}
19 | | Field | Description |
20 | | --- | --- |
21 | {{ if $type.GVK -}}
22 | | `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}`
23 | | `kind` _string_ | `{{ $type.GVK.Kind }}`
24 | {{ end -}}
25 |
26 | {{ range $type.Members -}}
27 | | `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} |
28 | {{ end -}}
29 |
30 | {{ end -}}
31 |
32 | {{- end -}}
33 | {{- end -}}
34 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/templates/type_members.tpl:
--------------------------------------------------------------------------------
1 | {{- define "type_members" -}}
2 | {{- $field := . -}}
3 | {{- if eq $field.Name "metadata" -}}
4 | Refer to Kubernetes API documentation for fields of `metadata`.
5 | {{- else -}}
6 | {{ markdownRenderFieldDoc $field.Doc }}
7 | {{- end -}}
8 | {{- end -}}
9 |
--------------------------------------------------------------------------------
/docs/crd-ref-docs/v1alpha2-config.yaml:
--------------------------------------------------------------------------------
1 | processor:
2 | # RE2 regular expressions describing types that should be excluded from the generated documentation.
3 | ignoreTypes:
4 | - "(Capsule)List$"
5 | - "(Capsule|Deployment)Status$"
6 | - "OwnedResource$"
7 | # RE2 regular expressions describing type fields that should be excluded from the generated documentation.
8 | ignoreFields:
9 | - "status$"
10 | - "TypeMeta$"
11 |
12 | render:
13 | # Version of Kubernetes to use when generating links to Kubernetes API documentation.
14 | kubernetesVersion: 1.28
15 |
--------------------------------------------------------------------------------
/docs/docs/additional-links.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | hide_table_of_contents: false
3 | show_last_update_author: false
4 | ---
5 |
6 | # Additional Links
7 |
8 | | Link |
9 | | ------------------------------ |
10 | | [API Reference of Rig Platform](https://buf.build/rigdev/rig) |
11 |
12 |
--------------------------------------------------------------------------------
/docs/docs/api.mdx:
--------------------------------------------------------------------------------
1 | # API Reference
2 |
3 | For reference of each of our api groups see their documentation:
4 | - [config.rig.dev/v1alpha1](/api/config/v1alpha1)
5 | - [OperatorConfig](/api/config/v1alpha1#operatorconfig)
6 | - [PlatformConfig](/api/config/v1alpha1#platformconfig)
7 | - [platform.rig.dev/v1](/api/platformv1)
8 | - [Capsule](/api/platformv1#capsule)
9 | - [rig.dev/v1alpha1](/api/v1alpha1)
10 | - [Capsule](/api/v1alpha1#capsule)
11 | - [rig.dev/v1alpha2](/api/v1alpha2)
12 | - [Capsule](/api/v1alpha2#capsule)
13 |
--------------------------------------------------------------------------------
/docs/docs/cluster.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | hide_table_of_contents: true
4 | ---
5 |
6 | import GettingStarted from "../src/markdown/prerequisites/getting-started.md";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 | # Cluster Management
11 |
12 | Rig is most effective when combined with the [Rig CLI](/overview/guides/getting-started#install-the-rig-cli) for managing modules and infrastructure.
13 | To access the CLI, login is required, and to perform the login, admin users must be created first.
14 | In these docs, you will find information about how to execute admin commands to manage admin users.
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/builtin.mdx:
--------------------------------------------------------------------------------
1 | # Builtin Plugins
2 |
3 | We have a list of builtin plugins which are always available in the operator. You can see a list of them here
4 | - [rigdev.annotations](builtin/annotations)
5 | - [rigdev.datadog](builtin/datadog)
6 | - [rigdev.env_mapping](builtin/env_mapping)
7 | - [rigdev.google_cloud_sql_auth_proxy](builtin/google_cloud_sql_auth_proxy)
8 | - [rigdev.init_container](builtin/init_container)
9 | - [rigdev.object_template](builtin/object_template)
10 | - [rigdev.object_create](builtin/object_create)
11 | - [rigdev.placement](builtin/placement)
12 | - [rigdev.sidecar](builtin/sidecar)
13 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/builtin/argo_rollout.mdx:
--------------------------------------------------------------------------------
1 | # Argo Rollout Plugin
2 |
3 | TBD
4 |
5 |
6 | ## Config
7 |
8 |
9 |
10 | Configuration for the argo_rollout plugin
11 |
12 | | Field | Description |
13 | | --- | --- |
14 | | `strategy` _[RolloutStrategy](#rolloutstrategy)_ | |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/builtin/env_mapping.mdx:
--------------------------------------------------------------------------------
1 | ## Config
2 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/builtin/init_container.mdx:
--------------------------------------------------------------------------------
1 | # Init Container Plugin
2 |
3 | The `rigdev.init_container` plugin adds an init container to the Capsule's deployment.
4 |
5 | The config can be templated with standard Go templating and has
6 |
7 | ```
8 | .capsule
9 | ```
10 |
11 | as its templating context.
12 |
13 | ## Example
14 |
15 | Config:
16 |
17 | ```yaml title="Helm values - Operator"
18 | config:
19 | pipeline:
20 | steps:
21 | - plugins:
22 | - plugin: rigdev.init_container
23 | config: |
24 | container:
25 | name: my-initcontainer
26 | image: my-container-image:v1.1
27 | ```
28 |
29 | The resulting Deployment resource of the Capsule
30 |
31 | ```
32 | kind: Deployment
33 | ...
34 | spec:
35 | template:
36 | spec:
37 | initContainers:
38 | - name: my-initcontainer
39 | image: my-container-image:v1.1
40 | ...
41 | ```
42 |
43 | ## Config
44 |
45 |
46 |
47 | Configuration for the init_container plugin
48 |
49 | | Field | Description |
50 | | --- | --- |
51 | | `container` _[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#container-v1-core)_ | Container holds the configuration for the init container |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/builtin/statefulset.mdx:
--------------------------------------------------------------------------------
1 | # Argo Rollout Plugin
2 |
3 | TBD
4 |
5 |
6 | ## Config
7 |
8 |
9 |
10 | Configuration for the argo_rollout plugin
11 |
12 | | Field | Description |
13 | | --- | --- |
14 | | `storageClass` _string_ | |
15 | | `size` _string_ | |
16 | | `mountPath` _string_ | |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/capsulesteps/cron_jobs.mdx:
--------------------------------------------------------------------------------
1 | # Cron Jobs Plugin
2 |
3 | The `rigdev.cron_jobs` plugin is the default plugin for handling the jobs specified in the `capsule spec` in the reconcilliation pipeline. For each job specified in the capsule spec, if the job is specified by a command, the plugin will create a cron job based on the container of the capsule deployment. Alternatively, if the job is specified by a URL, the plugin will create a cron job that will curl the URL.
4 |
5 | ## Config
6 |
7 |
8 |
9 | Configuration for the deployment plugin
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/capsulesteps/deployment.mdx:
--------------------------------------------------------------------------------
1 | # Deployment Plugin
2 |
3 | Default plugin for handling deployments in the reconcilliation pipeline. Another plugin can be specified in the `deploymentStep` in the pipeline in the operator config.
4 | The `rigdev.deployment` plugin will create a deployment for the capsule, and a service if the the capsule has interfaces defined.
5 |
6 |
7 |
8 |
9 | ## Config
10 |
11 |
12 |
13 | Configuration for the deployment plugin
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/capsulesteps/service_account.mdx:
--------------------------------------------------------------------------------
1 | # Service Account Plugin
2 | The `rigdev.service_account` plugin provides the default way of handling service accounts in the reconcilliation pipeline. It will create a service account with the name and namespace of the capsule.
3 |
4 | ## Config
5 |
6 |
7 |
8 | Configuration for the deployment plugin
9 |
10 | | Field | Description |
11 | | --- | --- |
12 | | `name` _string_ | Name of the service-account to generated. Supports templating, e.g. `\{\{ .capsule.metadata.name \}\}-svcacc` |
13 | | `useExisting` _boolean_ | UseExisting will, if enabled, skip the creation of the service-account but instead use an existing one, if it exists. |
14 | | `annotations` _object (keys:string, values:string)_ | Annotations to be added to all service accounts created. |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/capsulesteps/service_monitor.mdx:
--------------------------------------------------------------------------------
1 | # Service Monitor Plugin
2 | The `rigdev.service_monitor` plugin spawns a Prometheus ServiceMonitor per capsule
3 | for use with a Prometheus Operator stack. The service monitor will monitor services with the same name as the capsule and will use the endpoint specified by the `path` and `portName` fields in the configuration.
4 |
5 | ## Example
6 | Config:
7 | ```yaml title="Helm values - Operator"
8 | config:
9 | pipeline:
10 | serviceMonitorStep:
11 | plugin: "rigdev.service_monitor"
12 | config: |
13 | path: metrics
14 | portName: metricsport
15 | ```
16 |
17 | ## Config
18 |
19 |
20 |
21 | Configuration for the deployment plugin
22 |
23 | | Field | Description |
24 | | --- | --- |
25 | | `Path` _string_ | |
26 | | `PortName` _string_ | |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/capsulesteps/vpa.mdx:
--------------------------------------------------------------------------------
1 | ## Vertical Pod Autoscaler Plugin
2 | BETA
3 |
4 | ## Config
5 |
6 |
7 |
8 | Configuration for the deployment plugin
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/plugins/plugins.mdx:
--------------------------------------------------------------------------------
1 | # Plugins
2 |
3 | Plugins inject custom logic into the operator and is our way of extending the capability of a capsule with functionality not expressable throug the Capsule CRD.
4 | See [here](/operator-manual/setup-guide/operator/plugins) for how to configure the operator to execute plugins.
5 |
6 | Rig supplies a list of builtin plugins always available to the rig administrator. See [here](builtin) for a catalog.
7 |
8 | If none of the builtin plugins fit your needs, it is possible to write your own third-party plugins and inject them into the operator. You can find a guide for that [here](/operator-manual/plugins/thirdparty).
9 |
--------------------------------------------------------------------------------
/docs/docs/operator-manual/setup-guide/platform/network.mdx:
--------------------------------------------------------------------------------
1 | # Networking
2 |
3 | You can configure the platform to spin up an Ingress resource so it can be reached from outside the cluster. This can be done through the `ingress` section of the [Helm values](https://github.com/rigdev/rig/blob/main/deploy/charts/rig-platform/values.yaml) of the platform.
4 |
5 | ```yaml title="Helm values - Platform"
6 | ingress:
7 | enabled: true
8 | host: rig.example.com
9 | ````
10 |
--------------------------------------------------------------------------------
/docs/docs/platform/config-files.mdx:
--------------------------------------------------------------------------------
1 | # Config Files
2 |
3 | Config Files are a convenient way of mapping plain-text files into the Container, at the given path.
4 |
5 | In the Kubernetes cluster, a Config File is mapped to a ConfigMap, that is read-only mounted into the Container at the path given.
6 |
7 | The Config File does not support hot-swapping - changes to a Config File results in new resources being generated and Capsule instances being restarted.
8 |
9 | ### Secrets
10 |
11 | If a Config File is marked as a secret, it will be created as a Secret in Kubernetes, rather than a ConfigMap.
12 |
--------------------------------------------------------------------------------
/docs/docs/platform/custom-metrics.mdx:
--------------------------------------------------------------------------------
1 | # Custom Metrics Autoscaling
2 |
3 | The [Kubernetes Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) also supports custom metrics and Rig can use that as well.
4 | Rig currently supports *Pod Metrics* and *Object Metrics*. Within the Rig ecosystem we call pod metrics for *Instance Metrics*.
5 |
6 | To use custom metrics, you need an observability stack installed in your Kubernetes cluster. See the [operator manual](/operator-manual/setup-guide/operator/autoscaler) for details.
7 |
--------------------------------------------------------------------------------
/docs/plugin-ref-docs/config.yaml:
--------------------------------------------------------------------------------
1 | render:
2 | # Version of Kubernetes to use when generating links to Kubernetes API documentation.
3 | kubernetesVersion: 1.28
4 |
--------------------------------------------------------------------------------
/docs/plugin-ref-docs/templates/gv_details.tpl:
--------------------------------------------------------------------------------
1 | {{- define "gvDetails" -}}
2 | {{- $gv := . -}}
3 | {{ range $gv.SortedTypes }}
4 | {{ template "type" . }}
5 | {{ end }}
6 | {{- end -}}
7 |
--------------------------------------------------------------------------------
/docs/plugin-ref-docs/templates/gv_list.tpl:
--------------------------------------------------------------------------------
1 | {{- define "gvList" -}}
2 | ## Config
3 | {{ $groupVersions := . -}}
4 | {{- range $groupVersions -}}
5 | {{- template "gvDetails" . -}}
6 | {{- end -}}
7 | {{- end -}}
8 |
--------------------------------------------------------------------------------
/docs/plugin-ref-docs/templates/type.tpl:
--------------------------------------------------------------------------------
1 | {{- define "type" -}}
2 | {{- $type := . -}}
3 | {{- if markdownShouldRenderType $type -}}
4 | {{- if ne $type.Name "Config" }}
5 | ### {{ $type.Name }}
6 | {{- end }}
7 | {{ if $type.IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type.UnderlyingType }}_{{ end }}
8 | {{ $type.Doc }}
9 |
10 | {{ if $type.Members -}}
11 | | Field | Description |
12 | | --- | --- |
13 | {{ range $type.Members -}}
14 | | `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} |
15 | {{ end -}}
16 |
17 | {{ end -}}
18 |
19 | {{- end -}}
20 | {{- end -}}
21 |
--------------------------------------------------------------------------------
/docs/plugin-ref-docs/templates/type_members.tpl:
--------------------------------------------------------------------------------
1 | {{- define "type_members" -}}
2 | {{- $field := . -}}
3 | {{ markdownRenderFieldDoc $field.Doc }}
4 | {{- end -}}
5 |
--------------------------------------------------------------------------------
/docs/src/components/DynamicBiIcon/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import * as Icons from "react-icons/bi";
4 | import * as SimpleIcons from "react-icons/si";
5 | import * as TablerIcons from "react-icons/tb";
6 | import * as AWSIcons from "react-icons/fa";
7 |
8 | /* Your icon name from database data can now be passed as prop */
9 | const DynamicBiIcon = ({ name, size }) => {
10 | let IconComponent = Icons[name];
11 | if (!IconComponent) {
12 | IconComponent = SimpleIcons[name];
13 | }
14 | if (!IconComponent) {
15 | IconComponent = TablerIcons[name];
16 | }
17 | if (!IconComponent) {
18 | IconComponent = AWSIcons[name];
19 | }
20 | if (!IconComponent) {
21 | // Return a default one
22 | return ;
23 | }
24 |
25 | return ;
26 | };
27 |
28 | export default DynamicBiIcon;
29 |
--------------------------------------------------------------------------------
/docs/src/components/HomepageFeatures/styles.module.css:
--------------------------------------------------------------------------------
1 | .features {
2 | display: flex;
3 | align-items: center;
4 | padding: 2rem 0;
5 | width: 100%;
6 | }
7 |
8 | .featureSvg {
9 | height: 200px;
10 | width: 200px;
11 | }
12 |
--------------------------------------------------------------------------------
/docs/src/constants/versions.ts:
--------------------------------------------------------------------------------
1 | export const RIG_VERSION = "1.12.7";
2 | export const RIG_OPERATOR_CHART_VERSION = "1.0.44";
3 | export const RIG_PLATFORM_CHART_VERSION = "1.0.70";
4 |
--------------------------------------------------------------------------------
/docs/src/markdown/examples/examples.mdx:
--------------------------------------------------------------------------------
1 | import DocCardList from '@theme/DocCardList';
2 |
3 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/docs/src/markdown/prerequisites/create-credential.md:
--------------------------------------------------------------------------------
1 | ### Create Credential
2 | Before proceeding, it is assumed that you have created your Rig Credential, which will be used for authentication purposes. If you haven't created your Rig Credential yet, please refer to the [Create Credential Guide](/service-accounts) for detailed instructions.
--------------------------------------------------------------------------------
/docs/src/markdown/prerequisites/getting-started.md:
--------------------------------------------------------------------------------
1 | :::info Prerequisites
2 | Make sure that you have followed the steps to setup Rig through [the getting started guide](/overview/guides/getting-started).
3 | :::
--------------------------------------------------------------------------------
/docs/src/markdown/prerequisites/install-rig.md:
--------------------------------------------------------------------------------
1 | ### Install Rig
2 | To proceed with the instructions provided, it is assumed that you have already installed and set up a Rig backend. If you haven't done so yet, you can refer to the self-hosting guide, which provides step-by-step instructions for installing Rig on either [Docker](/docker) or [Kubernetes](/kubernetes).
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/docs/src/markdown/prerequisites/setup-cli.md:
--------------------------------------------------------------------------------
1 | ### Setup the CLI
2 | This section contains code snippets that demonstrate how to send requests to your Rig backend using Rig's CLI. If you intend to use the CLI examples, it is assumed that you have already installed [Rig’s CLI installed](/cli) and logged in using your dashboard user credentials.
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/docs/src/markdown/prerequisites/setup-sdk.md:
--------------------------------------------------------------------------------
1 | ### Setup the SDK
2 | This section provides code snippets that demonstrate how to send requests to your Rig backend using Rig's SDK. It is assumed that if you follow the SDK code blocks, you have already installed [Rig’s SDK](/sdks) and created a client instance.
--------------------------------------------------------------------------------
/docs/src/markdown/sdk/sdks.mdx:
--------------------------------------------------------------------------------
1 | import DocCardList from "@theme/DocCardList";
2 |
3 |
27 |
--------------------------------------------------------------------------------
/docs/src/theme/Admonition/styles.module.css:
--------------------------------------------------------------------------------
1 | .admonition {
2 | margin-bottom: 1em;
3 | background-color: var(--ifm-color-emphasis-100);
4 | }
5 |
6 | .admonition a {
7 | color: var(--ifm-color-emphasis-700);
8 | }
9 |
10 | .admonitionHeading {
11 | font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) /
12 | var(--ifm-heading-line-height) var(--ifm-heading-font-family);
13 | text-transform: uppercase;
14 | margin-bottom: 0.3rem;
15 | color: var(--ifm-color-emphasis-900);
16 | }
17 |
18 | .admonitionHeading code {
19 | text-transform: none;
20 | }
21 |
22 | .admonitionIcon {
23 | display: inline-block;
24 | vertical-align: middle;
25 | margin-right: 0.4em;
26 | }
27 |
28 | .admonitionIcon svg {
29 | display: inline-block;
30 | height: 1.6em;
31 | width: 1.6em;
32 | fill: var(--ifm-alert-foreground-color);
33 | }
34 |
35 | .admonitionContent > :last-child {
36 | margin-bottom: 0;
37 | color: var(--ifm-color-emphasis-700);
38 | }
39 |
--------------------------------------------------------------------------------
/docs/src/theme/CodeBlock/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import CodeBlock from '@theme-original/CodeBlock';
3 | import type CodeBlockType from '@theme/CodeBlock';
4 | import type {WrapperProps} from '@docusaurus/types';
5 |
6 | type Props = WrapperProps;
7 |
8 | export default function CodeBlockWrapper(props: Props): JSX.Element {
9 | return (
10 | <>
11 |
12 | >
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/docs/src/theme/DocCard/styles.module.css:
--------------------------------------------------------------------------------
1 | .cardContainer {
2 | --ifm-link-color: var(--ifm-color-emphasis-800);
3 | --ifm-link-hover-color: var(--ifm-color-emphasis-700);
4 | --ifm-link-hover-decoration: none;
5 |
6 | box-shadow: none;
7 | border: 1px solid var(--ifm-color-emphasis-200);
8 |
9 | background-color: var(--ifm-color-emphasis-100);
10 |
11 | margin-right: 0;
12 | margin-left: 0;
13 |
14 |
15 | box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%);
16 | border: 1px solid var(--ifm-color-emphasis-200);
17 | transition: all var(--ifm-transition-fast) ease;
18 | transition-property: border, box-shadow;
19 | }
20 |
21 | .cardContainer:hover {
22 | border-color: var(--ifm-color-emphasis-600);
23 | box-shadow: 0 3px 6px 0 rgb(0 0 0 / 20%);
24 | }
25 |
26 | .cardContainer *:last-child {
27 | margin-bottom: 0;
28 | }
29 |
30 | .cardTitle {
31 | font-weight: 00 !important;
32 | font-size: 16px !important;
33 | color: var(--ifm-color-primary);
34 | }
35 |
36 | .cardDescription {
37 | font-weight: 400 !important;
38 | font-size: 14px !important;
39 | color: var(--ifm-color-emphasis-600);
40 | }
41 |
42 | .cardIcon {
43 | margin-bottom: 10px;
44 | }
45 |
--------------------------------------------------------------------------------
/docs/src/theme/DocCardList/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import {
4 | useCurrentSidebarCategory,
5 | filterDocCardListItems,
6 | } from '@docusaurus/plugin-content-docs/client';
7 | import DocCard from '@theme/DocCard';
8 | function DocCardListForCurrentSidebarCategory({className}) {
9 | const category = useCurrentSidebarCategory();
10 | return ;
11 | }
12 | export default function DocCardList(props) {
13 | const {items, className} = props;
14 | if (!items) {
15 | return ;
16 | }
17 | const filteredItems = filterDocCardListItems(items);
18 | return (
19 |
20 | {filteredItems.map((item, index) => (
21 |
22 |
23 |
24 | ))}
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/Footer/styles.module.css:
--------------------------------------------------------------------------------
1 | .lastUpdated {
2 | margin-top: 0.2rem;
3 | font-style: italic;
4 | font-size: smaller;
5 | }
6 |
7 | @media (min-width: 997px) {
8 | .lastUpdated {
9 | text-align: right;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/Layout/styles.module.css:
--------------------------------------------------------------------------------
1 | .docItemContainer header + *,
2 | .docItemContainer article > *:first-child {
3 | margin-top: 0;
4 | }
5 |
6 | @media (min-width: 997px) {
7 | .docItemCol {
8 | max-width: 75% !important;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/Metadata/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {PageMetadata} from '@docusaurus/theme-common';
3 | import {useDoc} from '@docusaurus/plugin-content-docs/client';
4 | export default function DocItemMetadata() {
5 | const {metadata, frontMatter, assets} = useDoc();
6 | return (
7 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/Paginator/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useDoc} from '@docusaurus/plugin-content-docs/client';
3 | import DocPaginator from '@theme/DocPaginator';
4 | /**
5 | * This extra component is needed, because should remain generic.
6 | * DocPaginator is used in non-docs contexts too: generated-index pages...
7 | */
8 | export default function DocItemPaginator() {
9 | const {metadata} = useDoc();
10 | return ;
11 | }
12 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/TOC/Desktop/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {ThemeClassNames} from '@docusaurus/theme-common';
3 | import {useDoc} from '@docusaurus/plugin-content-docs/client';
4 | import TOC from '@theme/TOC';
5 | export default function DocItemTOCDesktop() {
6 | const {toc, frontMatter} = useDoc();
7 | return (
8 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/TOC/Mobile/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import {ThemeClassNames} from '@docusaurus/theme-common';
4 | import {useDoc} from '@docusaurus/plugin-content-docs/client';
5 | import TOCCollapsible from '@theme/TOCCollapsible';
6 | import styles from './styles.module.css';
7 | export default function DocItemTOCMobile() {
8 | const {toc, frontMatter} = useDoc();
9 | return (
10 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/TOC/Mobile/styles.module.css:
--------------------------------------------------------------------------------
1 | @media (min-width: 997px) {
2 | /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
3 | .tocMobile {
4 | display: none;
5 | }
6 | }
7 |
8 | @media print {
9 | .tocMobile {
10 | display: none;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/docs/src/theme/DocItem/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {HtmlClassNameProvider} from '@docusaurus/theme-common';
3 | import {DocProvider} from '@docusaurus/plugin-content-docs/client';
4 | import DocItemMetadata from '@theme/DocItem/Metadata';
5 | import DocItemLayout from '@theme/DocItem/Layout';
6 | export default function DocItem(props) {
7 | const docHtmlClassName = `docs-doc-id-${props.content.metadata.id}`;
8 | const MDXComponent = props.content;
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/Main/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import {useDocsSidebar} from '@docusaurus/plugin-content-docs/client';
4 | import styles from './styles.module.css';
5 | export default function DocRootLayoutMain({hiddenSidebarContainer, children}) {
6 | const sidebar = useDocsSidebar();
7 | return (
8 |
13 |
19 | {children}
20 |
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/Main/styles.module.css:
--------------------------------------------------------------------------------
1 | .docMainContainer {
2 | display: flex;
3 | max-width: var(--doc-content-width);
4 | }
5 |
6 | @media (min-width: 1400px) {
7 | .docMainContainer {
8 | flex-grow: 1;
9 | width: calc(var(--doc-content-width) - var(--doc-sidebar-width));
10 | }
11 |
12 | .docMainContainerEnhanced {
13 | width: calc(var(--doc-content-width) - var(--doc-sidebar-hidden-width));
14 | }
15 |
16 | .docItemWrapperEnhanced {
17 | width: calc(
18 | var(--ifm-container-width) + var(--doc-sidebar-width)
19 | ) !important;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {translate} from '@docusaurus/Translate';
3 | import IconArrow from '@theme/Icon/Arrow';
4 | import styles from './styles.module.css';
5 | export default function DocRootLayoutSidebarExpandButton({toggleSidebar}) {
6 | return (
7 |
25 |
26 |
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css:
--------------------------------------------------------------------------------
1 | @media (min-width: 997px) {
2 | .expandButton {
3 | position: absolute;
4 | top: 0;
5 | right: 0;
6 | width: 100%;
7 | height: 100%;
8 | display: flex;
9 | align-items: center;
10 | justify-content: center;
11 | transition: background-color var(--ifm-transition-fast) ease;
12 | background-color: var(--docusaurus-collapse-button-bg);
13 | }
14 |
15 | .expandButton:hover,
16 | .expandButton:focus {
17 | background-color: var(--docusaurus-collapse-button-bg-hover);
18 | }
19 |
20 | .expandButtonIcon {
21 | transform: rotate(0);
22 | }
23 |
24 | [dir='rtl'] .expandButtonIcon {
25 | transform: rotate(180deg);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/Sidebar/styles.module.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --doc-sidebar-width: 300px;
3 | --doc-content-width: 1400px;
4 | --doc-sidebar-hidden-width: 30px;
5 | }
6 |
7 | .docSidebarContainer {
8 | display: none;
9 | }
10 |
11 | @media (min-width: 997px) {
12 | .docSidebarContainer {
13 | display: block;
14 | width: var(--doc-sidebar-width);
15 | margin-top: calc(-1 * var(--ifm-navbar-height));
16 | border-right: 1px solid var(--ifm-toc-border-color);
17 | will-change: width;
18 | transition: width var(--ifm-transition-fast) ease;
19 | clip-path: inset(0);
20 | }
21 |
22 | .docSidebarContainerHidden {
23 | width: var(--doc-sidebar-hidden-width);
24 | cursor: pointer;
25 | }
26 |
27 | .sidebarViewport {
28 | top: 0;
29 | position: sticky;
30 | height: 100%;
31 | max-height: 100vh;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/index.js:
--------------------------------------------------------------------------------
1 | import React, {useState} from 'react';
2 | import {useDocsSidebar} from '@docusaurus/plugin-content-docs/client';
3 | import BackToTopButton from '@theme/BackToTopButton';
4 | import DocRootLayoutSidebar from '@theme/DocRoot/Layout/Sidebar';
5 | import DocRootLayoutMain from '@theme/DocRoot/Layout/Main';
6 | import styles from './styles.module.css';
7 | export default function DocRootLayout({children}) {
8 | const sidebar = useDocsSidebar();
9 | const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false);
10 | return (
11 |
12 |
13 |
14 | {sidebar && (
15 |
20 | )}
21 |
22 | {children}
23 |
24 |
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/docs/src/theme/DocRoot/Layout/styles.module.css:
--------------------------------------------------------------------------------
1 | .docRoot {
2 | display: flex;
3 | width: 100%;
4 | }
5 |
6 | .docsWrapper {
7 | display: inline-block;
8 | flex: 1 0 auto;
9 | margin: 0 auto;
10 | }
11 |
--------------------------------------------------------------------------------
/docs/src/theme/DocSidebarItem/Html/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import {ThemeClassNames} from '@docusaurus/theme-common';
4 | import styles from './styles.module.css';
5 | export default function DocSidebarItemHtml({item, level, index}) {
6 | const {value, defaultStyle, className} = item;
7 | return (
8 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/docs/src/theme/DocSidebarItem/Html/styles.module.css:
--------------------------------------------------------------------------------
1 | @media (min-width: 997px) {
2 | .menuHtmlItem {
3 | padding: var(--ifm-menu-link-padding-vertical)
4 | var(--ifm-menu-link-padding-horizontal);
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/docs/src/theme/DocSidebarItem/Link/styles.module.css:
--------------------------------------------------------------------------------
1 | .menuExternalLink {
2 | align-items: center;
3 | }
4 |
--------------------------------------------------------------------------------
/docs/src/theme/DocSidebarItem/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import DocSidebarItemCategory from '@theme/DocSidebarItem/Category';
3 | import DocSidebarItemLink from '@theme/DocSidebarItem/Link';
4 | import DocSidebarItemHtml from '@theme/DocSidebarItem/Html';
5 | export default function DocSidebarItem({item, ...props}) {
6 | switch (item.type) {
7 | case 'category':
8 | return ;
9 | case 'html':
10 | return ;
11 | case 'link':
12 | default:
13 | return ;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/docs/src/theme/EditThisPage/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {ThemeClassNames} from '@docusaurus/theme-common';
3 | import Button from '../../components/Button';
4 | export default function EditThisPage({editUrl}) {
5 | return (
6 |
11 |
14 | Edit this page
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/docs/src/theme/Footer/Logo/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import Link from '@docusaurus/Link';
4 | import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
5 | import ThemedImage from '@theme/ThemedImage';
6 | import styles from './styles.module.css';
7 | function LogoImage({logo}) {
8 | const {withBaseUrl} = useBaseUrlUtils();
9 | const sources = {
10 | light: withBaseUrl(logo.src),
11 | dark: withBaseUrl(logo.srcDark ?? logo.src),
12 | };
13 | return (
14 |
22 | );
23 | }
24 | export default function FooterLogo({logo}) {
25 | return logo.href ? (
26 |
30 |
31 |
32 | ) : (
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/docs/src/theme/Footer/Logo/styles.module.css:
--------------------------------------------------------------------------------
1 | .footerLogoLink {
2 | opacity: 0.5;
3 | transition: opacity var(--ifm-transition-fast)
4 | var(--ifm-transition-timing-default);
5 | }
6 |
7 | .footerLogoLink:hover {
8 | opacity: 1;
9 | }
10 |
--------------------------------------------------------------------------------
/docs/src/theme/Footer/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Footer from '@theme-original/Footer';
3 |
4 | export default function FooterWrapper(props) {
5 | return (
6 | <>
7 |
8 | >
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/docs/src/theme/Icon/Arrow/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Arrow from '@theme-original/Icon/Arrow';
3 |
4 | export default function ArrowWrapper(props) {
5 | return (
6 | <>
7 |
8 | >
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/ColorModeToggle/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useColorMode, useThemeConfig} from '@docusaurus/theme-common';
3 | import Button from '../../../components/Button';
4 | import DynamicBiIcon from '../../../components/DynamicBiIcon';
5 | export default function NavbarColorModeToggle({className}) {
6 | const navbarStyle = useThemeConfig().navbar.style;
7 | const disabled = useThemeConfig().colorMode.disableSwitch;
8 | const {colorMode, setColorMode} = useColorMode();
9 | if (disabled) {
10 | return null;
11 | }
12 |
13 | return (
14 | setColorMode(colorMode === "light" ? "dark" : "light")} width='35px' height='35px' textAlign='center'>
15 |
16 | {colorMode === "dark" && (
17 |
18 | )}
19 | {colorMode === "light" && (
20 |
21 | )}
22 |
23 |
24 | );
25 | }
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/ColorModeToggle/styles.module.css:
--------------------------------------------------------------------------------
1 | .darkNavbarColorModeToggle:hover {
2 | background: var(--ifm-color-gray-800);
3 | }
4 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/Content/styles.module.css:
--------------------------------------------------------------------------------
1 | /*
2 | Hide color mode toggle in small viewports
3 | */
4 | @media (max-width: 996px) {
5 | .colorModeToggle {
6 | display: none;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/Layout/styles.module.css:
--------------------------------------------------------------------------------
1 | .navbarHideable {
2 | transition: transform var(--ifm-transition-fast) ease;
3 | }
4 |
5 | .navbarHidden {
6 | transform: translate3d(0, calc(-100% - 2px), 0);
7 | }
8 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/Logo/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Logo from '@theme/Logo';
3 | export default function NavbarLogo() {
4 | return (
5 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/MobileSidebar/Header/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
3 | import {translate} from '@docusaurus/Translate';
4 | import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
5 | import IconClose from '@theme/Icon/Close';
6 | import NavbarLogo from '@theme/Navbar/Logo';
7 | function CloseButton() {
8 | const mobileSidebar = useNavbarMobileSidebar();
9 | return (
10 | mobileSidebar.toggle()}>
19 |
20 |
21 | );
22 | }
23 | export default function NavbarMobileSidebarHeader() {
24 | return (
25 |
26 |
27 |
28 |
29 |
30 | );
31 | }
32 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/MobileSidebar/Layout/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
4 | export default function NavbarMobileSidebarLayout({
5 | header,
6 | primaryMenu,
7 | secondaryMenu,
8 | }) {
9 | const {shown: secondaryMenuShown} = useNavbarSecondaryMenu();
10 | return (
11 |
12 | {header}
13 |
17 |
{primaryMenu}
18 |
{secondaryMenu}
19 |
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useThemeConfig} from '@docusaurus/theme-common';
3 | import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
4 | import NavbarItem from '@theme/NavbarItem';
5 | function useNavbarItems() {
6 | // TODO temporary casting until ThemeConfig type is improved
7 | return useThemeConfig().navbar.items;
8 | }
9 | // The primary menu displays the navbar items
10 | export default function NavbarMobilePrimaryMenu() {
11 | const mobileSidebar = useNavbarMobileSidebar();
12 | // TODO how can the order be defined for mobile?
13 | // Should we allow providing a different list of items?
14 | const items = useNavbarItems();
15 | return (
16 |
17 | {items.map((item, i) => (
18 | mobileSidebar.toggle()}
22 | key={i}
23 | />
24 | ))}
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/MobileSidebar/Toggle/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
3 | import {translate} from '@docusaurus/Translate';
4 | import IconMenu from '@theme/Icon/Menu';
5 | export default function MobileSidebarToggle() {
6 | const {toggle, shown} = useNavbarMobileSidebar();
7 | return (
8 |
19 |
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/MobileSidebar/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | useLockBodyScroll,
4 | useNavbarMobileSidebar,
5 | } from '@docusaurus/theme-common/internal';
6 | import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
7 | import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
8 | import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu';
9 | import NavbarMobileSidebarSecondaryMenu from '@theme/Navbar/MobileSidebar/SecondaryMenu';
10 | export default function NavbarMobileSidebar() {
11 | const mobileSidebar = useNavbarMobileSidebar();
12 | useLockBodyScroll(mobileSidebar.shown);
13 | if (!mobileSidebar.shouldRender) {
14 | return null;
15 | }
16 | return (
17 | }
19 | primaryMenu={ }
20 | secondaryMenu={ }
21 | />
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/Search/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import styles from './styles.module.css';
4 | export default function NavbarSearch({children, className}) {
5 | return {children}
;
6 | }
7 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/Search/styles.module.css:
--------------------------------------------------------------------------------
1 | @media (max-width: 996px) {
2 | .searchBox {
3 | position: absolute;
4 | right: var(--ifm-navbar-padding-horizontal);
5 | }
6 | }
7 |
8 | @media (min-width: 997px) {
9 | .searchBox {
10 | padding: var(--ifm-navbar-item-padding-vertical)
11 | var(--ifm-navbar-item-padding-horizontal);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/docs/src/theme/Navbar/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import NavbarLayout from '@theme/Navbar/Layout';
3 | import NavbarContent from '@theme/Navbar/Content';
4 | export default function Navbar() {
5 | return (
6 |
7 |
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/docs/src/theme/Tabs/styles.module.css:
--------------------------------------------------------------------------------
1 | .tabList {
2 | margin-bottom: var(--ifm-leading);
3 | background-color: #1E1E1E;
4 | border-radius: var(--ifm-code-border-radius);
5 | padding: 15px;
6 | }
7 |
8 | .tabItem {
9 | margin-top: 0 !important;
10 | color: var(--ifm-color-emphasis-600);
11 | font-size: 13px;
12 | font-weight: 500;
13 | line-height: 20px;
14 | padding: 3px 15px 0 15px;
15 | margin-right: 10px;
16 | height: 30px;
17 | border: 1px solid transparent;
18 | border-radius: 22px;
19 | }
20 |
21 | .tabItemActive {
22 | color: white;
23 | border: 1px solid var(--ifm-color-emphasis-800);
24 | background-color: #1E1E1E;
25 | }
--------------------------------------------------------------------------------
/docs/src/theme/ThemedImage/styles.module.css:
--------------------------------------------------------------------------------
1 | .themedImage {
2 | display: block;
3 | margin: auto auto 20px auto;
4 | }
5 |
6 | .themedImageZoom {
7 | display: none;
8 | border-radius: 8px !important;
9 | margin: auto auto 20px auto;
10 | }
11 |
12 | [data-theme='light'] .themedImage--light {
13 | display: block;
14 | }
15 |
16 | [data-theme='dark'] .themedImage--light {
17 | display: none;
18 | }
19 |
20 | [data-theme='light'] .themedImage--dark {
21 | display: none;
22 | }
23 |
24 | [data-theme='dark'] .themedImage--dark {
25 | display: block;
26 | }
27 |
--------------------------------------------------------------------------------
/docs/static/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/.nojekyll
--------------------------------------------------------------------------------
/docs/static/img/banners/authentication-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/authentication-banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/capsules-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/capsules-banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/database-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/database-banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/docs-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/docs-banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/helm-migration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/helm-migration.png
--------------------------------------------------------------------------------
/docs/static/img/banners/kubernetes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/kubernetes.png
--------------------------------------------------------------------------------
/docs/static/img/banners/local-machine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/local-machine.png
--------------------------------------------------------------------------------
/docs/static/img/banners/rig-argo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/rig-argo.png
--------------------------------------------------------------------------------
/docs/static/img/banners/storage-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/storage-banner.png
--------------------------------------------------------------------------------
/docs/static/img/banners/users-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/banners/users-banner.png
--------------------------------------------------------------------------------
/docs/static/img/cli/capsule/capsule-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/cli/capsule/capsule-status.png
--------------------------------------------------------------------------------
/docs/static/img/cli/capsule/deploy-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/cli/capsule/deploy-image.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/autoscaler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/autoscaler.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/config-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/config-file.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/config-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/config-overview.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/kubernetes-diff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/kubernetes-diff.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/network-interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/network-interface.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/nginx-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/nginx-image.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/platform-diff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/platform-diff.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/scale.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-config/vertical-scaling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-config/vertical-scaling.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule-status/capsule-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule-status/capsule-status.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule/create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule/create.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/capsule/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/capsule/overview.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/container-registries/add-registry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/container-registries/add-registry.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/container-settings/advanced.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/container-settings/advanced.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/container-settings/env-vars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/container-settings/env-vars.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/cronjobs/create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/cronjobs/create.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/cronjobs/list-executions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/cronjobs/list-executions.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/collective-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/collective-logs.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/logs.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/overview.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/shell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/shell.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/status.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/instance/terminated-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/instance/terminated-overview.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/network/edit-host.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/network/edit-host.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/network/edit-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/network/edit-path.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/network/interface-and-healthchecks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/network/interface-and-healthchecks.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/project/create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/project/create.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/rbac/add-member.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/rbac/add-member.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/rbac/assign-role.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/rbac/assign-role.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/rollout/rollback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/rollout/rollback.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/rollout/stages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/rollout/stages.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/service-accounts/create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/service-accounts/create.png
--------------------------------------------------------------------------------
/docs/static/img/dashboard/platform/service-accounts/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/dashboard/platform/service-accounts/list.png
--------------------------------------------------------------------------------
/docs/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/favicon.ico
--------------------------------------------------------------------------------
/docs/static/img/guides/argo_new_app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/argo_new_app.png
--------------------------------------------------------------------------------
/docs/static/img/guides/argo_repo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/argo_repo.png
--------------------------------------------------------------------------------
/docs/static/img/guides/argo_rig_deploy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/argo_rig_deploy.gif
--------------------------------------------------------------------------------
/docs/static/img/guides/argo_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/argo_sync.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/aws1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/aws1.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/aws2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/aws2.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/aws3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/aws3.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step1.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step10.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step11.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step2.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step3.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step4.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step5.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step6.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step7.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step8.png
--------------------------------------------------------------------------------
/docs/static/img/guides/aws/step9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/aws/step9.png
--------------------------------------------------------------------------------
/docs/static/img/guides/landingpage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/guides/landingpage.png
--------------------------------------------------------------------------------
/docs/static/img/logo-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/logo-dark.png
--------------------------------------------------------------------------------
/docs/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/logo.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/capsule-spec-translation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/capsule-spec-translation.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/environment/multi-cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/environment/multi-cluster.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/environment/topology.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/environment/topology.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/google-oauth-client.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/google-oauth-client.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/migrate-apply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/migrate-apply.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/migrate-deployments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/migrate-deployments.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/migrate-diff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/migrate-diff.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/migrate-parts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/migrate-parts.png
--------------------------------------------------------------------------------
/docs/static/img/operator-manual/plugin_pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/operator-manual/plugin_pipeline.png
--------------------------------------------------------------------------------
/docs/static/img/platform/capsule-extensions-ui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/platform/capsule-extensions-ui.png
--------------------------------------------------------------------------------
/docs/static/img/platform/prometheus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/platform/prometheus.png
--------------------------------------------------------------------------------
/docs/static/img/platform/slack-create-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/platform/slack-create-app.png
--------------------------------------------------------------------------------
/docs/static/img/platform/update-global-notifiers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rigdev/rig/6d72f9cab98a063dab4804bfe3110050f0c5c759/docs/static/img/platform/update-global-notifiers.png
--------------------------------------------------------------------------------
/docs/static/js/segment.js:
--------------------------------------------------------------------------------
1 |
2 | !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){if(window.analytics.initialized)return window.analytics[e].apply(window.analytics,arguments);var i=Array.prototype.slice.call(arguments);i.unshift(e);analytics.push(i);return analytics}};for(var i=0;i `\{\{ .capsule.metadata.name \}\}-svcacc` |
13 | | `useExisting` _boolean_ | UseExisting will, if enabled, skip the creation of the service-account but instead use an existing one, if it exists. |
14 | | `annotations` _object (keys:string, values:string)_ | Annotations to be added to all service accounts created. |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/plugins/capsulesteps/service_monitor/README.md:
--------------------------------------------------------------------------------
1 | # Service Monitor Plugin
2 | The `rigdev.service_monitor` plugin spawns a Prometheus ServiceMonitor per capsule
3 | for use with a Prometheus Operator stack. The service monitor will monitor services with the same name as the capsule and will use the endpoint specified by the `path` and `portName` fields in the configuration.
4 |
5 | ## Example
6 | Config:
7 | ```yaml title="Helm values - Operator"
8 | config:
9 | pipeline:
10 | serviceMonitorStep:
11 | plugin: "rigdev.service_monitor"
12 | config: |
13 | path: metrics
14 | portName: metricsport
15 | ```
16 |
17 | ## Config
18 |
19 |
20 |
21 | Configuration for the deployment plugin
22 |
23 | | Field | Description |
24 | | --- | --- |
25 | | `Path` _string_ | |
26 | | `PortName` _string_ | |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/plugins/capsulesteps/vpa/README.md:
--------------------------------------------------------------------------------
1 | ## Vertical Pod Autoscaler Plugin
2 | BETA
3 |
4 | ## Config
5 |
6 |
7 |
8 | Configuration for the deployment plugin
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/proto/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Proto
3 | BasedOnStyle: Google
4 | IndentWidth: 2
5 |
--------------------------------------------------------------------------------
/proto/buf.gen.publish.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | managed:
3 | enabled: true
4 | go_package_prefix:
5 | default: github.com/rigdev/rig-go-api
6 | plugins:
7 | - name: go
8 | path: tools/bin/protoc-gen-go
9 | out: ./gen/go/rig
10 | opt:
11 | - paths=source_relative
12 | - name: connect-go
13 | path: tools/bin/protoc-gen-connect-go
14 | out: ./gen/go/rig
15 | opt:
16 | - paths=source_relative
17 | - name: es
18 | out: ./gen/ts/rig
19 | opt:
20 | - target=ts
21 | - name: connect-es
22 | out: ./gen/ts/rig
23 | opt:
24 | - target=ts
25 |
--------------------------------------------------------------------------------
/proto/buf.gen.yaml:
--------------------------------------------------------------------------------
1 | # /proto/buf.gen.yaml
2 | version: v1
3 | managed:
4 | enabled: true
5 | go_package_prefix:
6 | default: github.com/rigdev/rig-go-api
7 | plugins:
8 | - name: go
9 | path: tools/bin/protoc-gen-go
10 | out: gen/go/rig
11 | opt:
12 | - paths=source_relative
13 | - name: connect-go
14 | path: tools/bin/protoc-gen-connect-go
15 | out: gen/go/rig
16 | opt:
17 | - paths=source_relative
18 | - name: go-grpc
19 | path: tools/bin/protoc-gen-go-grpc
20 | out: gen/go/rig
21 | opt:
22 | - paths=source_relative
23 | - name: doc
24 | path: tools/bin/protoc-gen-doc
25 | out: docs/docs/api
26 | strategy: all
27 | opt:
28 | - docs/api-ref-docs/templates/service.tmpl,platform-api.md:operator/*
29 |
--------------------------------------------------------------------------------
/proto/buf.work.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | directories:
3 | - rig
4 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/activity/activity.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.activity;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "api/v1/capsule/rollout/status.proto";
7 |
8 | message Activity {
9 | google.protobuf.Timestamp timestamp = 1;
10 | Scope scope = 2;
11 | Message message = 3;
12 | }
13 |
14 | message Scope {
15 | string project = 1;
16 | string environment = 2;
17 | string capsule = 3;
18 | string user = 4;
19 | }
20 |
21 | message Message {
22 | message Rollout {
23 | uint64 rollout_id = 1;
24 | api.v1.capsule.rollout.StepState state = 2;
25 | }
26 |
27 | message Project {
28 | string project_id = 1;
29 | bool deleted = 2;
30 | }
31 |
32 | message Environment {
33 | string environment_id = 1;
34 | bool deleted = 2;
35 | }
36 |
37 | message Capsule {
38 | string capsule_id = 1;
39 | bool deleted = 2;
40 | }
41 |
42 | message User {
43 | string printable_name = 1;
44 | bool deleted = 2;
45 | }
46 |
47 | oneof message {
48 | Rollout rollout = 1;
49 | Project project = 3;
50 | Environment environment = 4;
51 | Capsule capsule = 5;
52 | User user = 6;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/activity/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.activity;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "api/v1/activity/activity.proto";
7 | import "model/common.proto";
8 |
9 | service Service {
10 | // Get Activities
11 | rpc GetActivities(GetActivitiesRequest) returns (GetActivitiesResponse) {}
12 | }
13 |
14 | message GetActivitiesRequest {
15 | google.protobuf.Timestamp from = 1;
16 | google.protobuf.Timestamp to = 2;
17 | model.Pagination pagination = 3;
18 | ActivityFilter filter = 4;
19 | }
20 |
21 | message ActivityFilter {
22 | string project_filter = 1;
23 | string environment_filter = 2;
24 | string capsule_filter = 3;
25 | string user_identifier_filter = 4;
26 | }
27 |
28 | message GetActivitiesResponse {
29 | repeated Activity activities = 1;
30 | uint64 total = 2;
31 | }
32 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/authentication/user.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.authentication;
4 |
5 | import "model/user.proto";
6 |
7 | message Token {
8 | // Access token
9 | string access_token = 1;
10 | // Refresh token
11 | string refresh_token = 2;
12 | }
13 |
14 | message ClientCredentials {
15 | // ID of the service account
16 | string client_id = 1;
17 | // secret of the service account
18 | string client_secret = 2;
19 | }
20 |
21 | message UserPassword {
22 | // Identifier of user. This can be username, email etc.
23 | model.UserIdentifier identifier = 1;
24 | // Password of the user
25 | string password = 2;
26 | }
27 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/capsule.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | import "model/author.proto";
6 | import "model/git.proto";
7 | import "google/protobuf/timestamp.proto";
8 |
9 | // Environment wide capsule abstraction.
10 | message Capsule {
11 | // ID of the capsule.
12 | string capsule_id = 1;
13 | // Last time the capsule was updated.
14 | google.protobuf.Timestamp updated_at = 6;
15 | // Author of the last update.
16 | model.Author updated_by = 7;
17 | model.GitStore git_store = 8;
18 | }
19 |
20 | message Update {
21 | oneof field {
22 | // Set the git store.
23 | model.GitStore set_git_store = 1;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/event.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "model/author.proto";
7 |
8 | // An event is a message from a rollout
9 | message Event {
10 | // Potential author associated with the event.
11 | model.Author created_by = 1;
12 | // When the event was created.
13 | google.protobuf.Timestamp created_at = 2;
14 | // The rollout that created the event.
15 | uint64 rollout_id = 3;
16 | // A message associated with the event.
17 | string message = 4;
18 | // The data associated with the event.
19 | EventData event_data = 5;
20 | }
21 |
22 | // An event that is associated with a rollout.
23 | message RolloutEvent {}
24 |
25 | // An event that is associated with an abort.
26 | message AbortEvent {}
27 |
28 | // An event that is associated with an error.
29 | message ErrorEvent {}
30 |
31 | // The data associated with an event.
32 | message EventData {
33 | oneof kind {
34 | // If event is a rollout.
35 | RolloutEvent rollout = 1;
36 | // if event is an error event.
37 | ErrorEvent error = 2;
38 | // If event is an abort event.
39 | AbortEvent abort = 3;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/field.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | enum FieldOperation {
6 | FIELD_OPERATION_UNSPECIFIED = 0;
7 | FIELD_OPERATION_ADDED = 1;
8 | FIELD_OPERATION_REMOVED = 2;
9 | FIELD_OPERATION_MODIFIED = 3;
10 | }
11 |
12 | message FieldChange {
13 | // The Field-ID associated with this change. This is formated as a
14 | // json-path string with '?' placeholders.
15 | string field_id = 1;
16 | // The unique Field-path identifying this change. This is formated as a
17 | // json-path string.
18 | string field_path = 2;
19 | // YAML encoding of the old value (if any).
20 | string old_value_yaml = 3;
21 | // YAML encoding of the new value (if any).
22 | string new_value_yaml = 4;
23 | // Operation is how this field-change is applied against the source to get
24 | // to the target spec.
25 | FieldOperation operation = 5;
26 | // Pretty-printed string description of the field change.
27 | string description = 6;
28 | }
29 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/image.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "model/author.proto";
7 |
8 | // Image is an cross-environment abstraction of an container image along with
9 | // metadata for a capsule.
10 | message Image {
11 | // unique identifier for the image
12 | string image_id = 2;
13 | // digest of the image
14 | string digest = 7;
15 | // repository of the image
16 | string repository = 8;
17 | // tag of the image
18 | string tag = 9;
19 | // user who created the image
20 | model.Author created_by = 3;
21 | // time the image was created
22 | google.protobuf.Timestamp created_at = 4;
23 | // origin of the image
24 | Origin origin = 5;
25 | // labels of the image
26 | map labels = 6;
27 | }
28 |
29 | // GitReference is an origin of a image.
30 | message GitReference {
31 | // The url of the git repository
32 | string repository_url = 1;
33 | // The commit sha of the git repository
34 | string commit_sha = 2;
35 | // The commit url of the git repository
36 | string commit_url = 3;
37 | }
38 |
39 | // Where the image came from
40 | message Origin {
41 | oneof kind {
42 | // The image came from a git repository
43 | GitReference git_reference = 1;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/log.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | import "google/protobuf/timestamp.proto";
6 |
7 | // Log of an instance
8 | message Log {
9 | // Timestamp of the log
10 | google.protobuf.Timestamp timestamp = 1;
11 | // Message of the log
12 | LogMessage message = 2;
13 | // Instance ID of the log
14 | string instance_id = 3;
15 | }
16 |
17 | // The actual log message
18 | message LogMessage {
19 | message ContainerTermination {}
20 | oneof message {
21 | // If the log is stdout
22 | bytes stdout = 1;
23 | // If the log is stderr
24 | bytes stderr = 2;
25 | // Represents a termination event
26 | ContainerTermination container_termination = 3;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/revision.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | import "model/revision.proto";
6 | import "platform/v1/generated.proto";
7 |
8 | message SetRevision {
9 | platform.v1.CapsuleSet spec = 1;
10 | model.RevisionMetadata metadata = 2;
11 | }
12 |
13 | message Revision {
14 | platform.v1.Capsule spec = 1;
15 | model.RevisionMetadata metadata = 2;
16 | string message = 4;
17 | }
18 |
19 | message Proposal {
20 | platform.v1.Capsule spec = 1;
21 | model.ProposalMetadata metadata = 3;
22 | }
23 |
24 | message SetProposal {
25 | platform.v1.CapsuleSet spec = 1;
26 | model.ProposalMetadata metadata = 3;
27 | }
28 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/capsule/sidecar.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capsule;
4 |
5 | // Deprecated: sidecar configuration
6 | message Sidecar {
7 | repeated SidecarInterface interfaces = 1;
8 | }
9 |
10 | // Deprecated: sidecar interface configuration
11 | message SidecarInterface {
12 | uint32 port = 1;
13 | uint32 proxy_port = 2;
14 | }
15 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/cluster/cluster.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.cluster;
4 |
5 | import "config/v1alpha1/generated.proto";
6 | import "model/metrics.proto";
7 |
8 | // Cluster model.
9 | message Cluster {
10 | // ID of the cluster.
11 | string cluster_id = 1;
12 | config.v1alpha1.OperatorConfig operator_config = 2;
13 | string operator_version = 3;
14 | string k8s_version = 4;
15 |
16 | model.Resources allocateable = 5;
17 | model.Resources usage = 6;
18 | model.Resources utilization = 7;
19 | }
20 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/environment/environment.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.environment;
4 |
5 | message Update {
6 | oneof field {
7 | string add_project = 2;
8 | string remove_project = 3;
9 | bool set_global = 4;
10 | }
11 | }
12 | // Environment model.
13 | message Environment {
14 | // ID of the environment.
15 | string environment_id = 1;
16 | // The version of the Rig-operator CRD for this environment.
17 | string operator_version = 3;
18 | // ID of the backing cluster.
19 | string cluster_id = 4;
20 | // Namespace template is used to generate the namespace name when configuring
21 | // resources. Default is to set the namespace equal to the project name.
22 | string namespace_template = 5;
23 | // If true, the environment is deletable by developer users, and can be
24 | // deleted with capsules running.
25 | bool ephemeral = 6;
26 | // Active Projects. These projects can deploy capsules to this environment.
27 | // This is overridden by a true the global flag.
28 | repeated string active_projects = 7;
29 | // If true, the environment is available to all projects.
30 | bool global = 8;
31 | }
32 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/environment/revision.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.environment;
4 |
5 | import "model/revision.proto";
6 | import "platform/v1/generated.proto";
7 |
8 | message Revision {
9 | platform.v1.Environment spec = 1;
10 | model.RevisionMetadata metadata = 2;
11 | }
12 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/group/group.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.group;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "model/metadata.proto";
7 |
8 | // Group is a named collection of users and service accounts with optional
9 | // metadata.
10 | message Group {
11 | // Unique name of the group.
12 | string group_id = 1;
13 | // Number of members.
14 | uint64 num_members = 5;
15 | // Metadata of the group.
16 | map metadata = 6;
17 | // Creation time of the group.
18 | google.protobuf.Timestamp created_at = 7;
19 | // Last update time of the group.
20 | google.protobuf.Timestamp updated_at = 8;
21 | }
22 |
23 | // An update msg for a group.
24 | message Update {
25 | oneof field {
26 | // Update the unique group name.
27 | string group_id = 1;
28 | // Update or create a metadata entry.
29 | model.Metadata set_metadata = 2;
30 | // Delete a metadata entry.
31 | string delete_metadata_key = 3;
32 | }
33 | }
34 |
35 | // MemberID is a union of service account id and user id.
36 | message MemberID {
37 | oneof kind {
38 | // ID of a service account.
39 | string service_account_id = 1;
40 | // ID of a user.
41 | string user_id = 2;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/issue/issue.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.issue;
4 |
5 | import "google/protobuf/timestamp.proto";
6 |
7 | enum Level {
8 | LEVEL_UNSPECIFIED = 0;
9 | LEVEL_INFORMATIVE = 1;
10 | LEVEL_MINOR = 2;
11 | LEVEL_MAJOR = 3;
12 | LEVEL_CRITICAL = 4;
13 | }
14 |
15 | message Issue {
16 | string issue_id = 1;
17 | string type = 2;
18 | google.protobuf.Timestamp created_at = 3;
19 | google.protobuf.Timestamp updated_at = 4;
20 | google.protobuf.Timestamp stale_at = 5;
21 | google.protobuf.Timestamp closed_at = 11;
22 | Reference reference = 6;
23 | string message = 7;
24 | Level level = 8;
25 | uint32 count = 9;
26 | }
27 |
28 | message Reference {
29 | string project_id = 1;
30 | string capsule_id = 2;
31 | string environment_id = 3;
32 | uint64 rollout_id = 4;
33 | string instance_id = 5;
34 | }
35 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/issue/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.issue;
4 |
5 | import "model/common.proto";
6 | import "api/v1/issue/issue.proto";
7 |
8 | service Service {
9 | // Get issues
10 | rpc GetIssues(GetIssuesRequest) returns (GetIssuesResponse) {}
11 | }
12 |
13 | message GetIssuesRequest {
14 | model.Pagination pagination = 1;
15 | Filter filter = 2;
16 | }
17 |
18 | message Filter {
19 | string project = 1;
20 | string environment = 2;
21 | string capsule = 3;
22 | Level level = 4;
23 | bool include_closed = 5;
24 | bool include_stale = 6;
25 | }
26 |
27 | message GetIssuesResponse {
28 | repeated Issue issues = 1;
29 | uint64 total = 2;
30 | }
31 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/metrics/metrics.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.metrics;
4 |
5 | import "google/protobuf/timestamp.proto";
6 |
7 | message Metric {
8 | google.protobuf.Timestamp timestamp = 1;
9 | double value = 2;
10 | }
11 |
12 | message MetricFull {
13 | Metric metric = 1;
14 | Tags tags = 2;
15 | }
16 |
17 | message Tags {
18 | string project = 1;
19 | string environment = 2;
20 | string capsule = 3;
21 | string metric_name = 4;
22 | string cluster = 5;
23 | }
24 |
25 | message Keys {
26 | bool project = 1;
27 | bool environment = 2;
28 | bool capsule = 3;
29 | bool metric_name = 4;
30 | string cluster = 6;
31 | bool all = 5;
32 | }
33 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/project/revision.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.project;
4 |
5 | import "model/revision.proto";
6 | import "platform/v1/generated.proto";
7 |
8 | message Revision {
9 | platform.v1.Project spec = 1;
10 | model.RevisionMetadata metadata = 2;
11 | }
12 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/service_account/service_account.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.service_account;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "model/author.proto";
7 |
8 | // Service account model.
9 | message ServiceAccount {
10 | // Unique name of the service account.
11 | string name = 1;
12 | // Creation date.
13 | google.protobuf.Timestamp created_at = 2;
14 | // Author of the service account.
15 | model.Author created_by = 3;
16 | // Whether the service account is managed by the system.
17 | bool managed = 4;
18 | // List of group IDs the service account belongs to.
19 | repeated string group_ids = 5;
20 | }
21 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/settings/configuration.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.settings;
4 |
5 | // Platform wide static configuration.
6 | message Configuration {
7 | Client client = 1;
8 | repeated string docker_registries = 2;
9 | EmailClient default_email = 3;
10 | map capsule_extensions = 4;
11 | }
12 |
13 | message Client {
14 | Slack slack = 1;
15 | repeated EmailClient email = 2;
16 | repeated Git git = 3;
17 | }
18 |
19 | message Slack {
20 | message Workspace {
21 | string name = 1;
22 | }
23 |
24 | repeated Workspace workspace = 1;
25 | }
26 |
27 | message EmailClient {
28 | string id = 1;
29 | EmailType type = 2;
30 | }
31 |
32 | enum EmailType {
33 | EMAIL_TYPE_UNSPECIFIED = 0;
34 | EMAIL_TYPE_MAILJET = 1;
35 | EMAIL_TYPE_SMTP = 2;
36 | }
37 |
38 | message Git {
39 | // URL is a exact match for the repo-url this auth can be used for.
40 | string url = 1;
41 | // URLPrefix is a prefix-match for the repo urls this auth can be used for.
42 | string url_prefix = 2;
43 | }
44 |
45 | message Extension {
46 | // The schema of the extension, expressed as a json-schema
47 | // (https://json-schema.org/).
48 | string json_schema = 1;
49 | }
50 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/settings/settings.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.settings;
4 |
5 | import "model/notification.proto";
6 | import "model/pipeline.proto";
7 | import "model/git.proto";
8 |
9 | // Platform wide settings.
10 | message Settings {
11 | repeated model.NotificationNotifier notification_notifiers = 1;
12 | model.GitStore git_store = 2;
13 | repeated model.Pipeline pipelines = 3;
14 | }
15 |
16 | // Update message for platform settings.
17 | message Update {
18 | message SetNotificationNotifiers {
19 | repeated model.NotificationNotifier notifiers = 1;
20 | }
21 |
22 | message SetPipelines {
23 | repeated model.Pipeline pipelines = 1;
24 | }
25 |
26 | oneof field {
27 | // Set the notification notifiers.
28 | SetNotificationNotifiers set_notification_notifiers = 1;
29 | // Set the git store.
30 | model.GitStore set_git_store = 2;
31 | // Set the pipelines.
32 | SetPipelines set_pipelines = 3;
33 | }
34 | }
35 |
36 | // The plan for a rig installation
37 | enum Plan {
38 | // Unspecified / unactivated plan.
39 | PLAN_UNSPECIFIED = 0;
40 | // Free tier.
41 | PLAN_FREE = 1;
42 | // Team / Pro tier.
43 | PLAN_TEAM = 2;
44 | // Enterprise tier.
45 | PLAN_ENTERPRISE = 3;
46 | }
47 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/tunnel/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.tunnel;
4 |
5 | service Service {
6 | rpc Tunnel(stream TunnelRequest) returns (stream TunnelResponse) {}
7 | }
8 |
9 | message TunnelRequest {
10 | TunnelMessage message = 1;
11 | }
12 |
13 | message TunnelResponse {
14 | TunnelMessage message = 1;
15 | }
16 |
17 | message TunnelMessage {
18 | oneof message {
19 | TunnelInfo new_tunnel = 1;
20 | TunnelData data = 2;
21 | TunnelClose close = 3;
22 | }
23 | }
24 |
25 | message TunnelInfo {
26 | uint64 tunnel_id = 1;
27 | uint32 port = 2;
28 | }
29 |
30 | message TunnelData {
31 | uint64 tunnel_id = 1;
32 | bytes data = 2;
33 | }
34 |
35 | message TunnelClose {
36 | uint64 tunnel_id = 1;
37 | uint32 code = 2;
38 | string message = 3;
39 | }
40 |
--------------------------------------------------------------------------------
/proto/rig/api/v1/user/settings/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.user.settings;
4 |
5 | import "api/v1/user/settings/settings.proto";
6 |
7 | // The Settings service provides methods for getting and updating the users
8 | // settings.
9 | service Service {
10 | // Gets the users settings for the current project.
11 | rpc GetSettings(GetSettingsRequest) returns (GetSettingsResponse) {}
12 | // Sets the users settings for the current project.
13 | rpc UpdateSettings(UpdateSettingsRequest) returns (UpdateSettingsResponse) {}
14 | }
15 |
16 | // Request for getting users settings for the Rig project.
17 | message GetSettingsRequest {}
18 |
19 | // Response for getting users settings for the Rig project.
20 | message GetSettingsResponse {
21 | // The users settings.
22 | api.v1.user.settings.Settings settings = 1;
23 | }
24 |
25 | // Request for updating users settings for the Rig project.
26 | message UpdateSettingsRequest {
27 | // The updates to apply to the users settings.
28 | repeated api.v1.user.settings.Update settings = 1;
29 | }
30 |
31 | // Empty response for updating users settings for the Rig project.
32 | message UpdateSettingsResponse {}
33 |
--------------------------------------------------------------------------------
/proto/rig/buf.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | name: "buf.build/rigdev/rig"
3 | lint:
4 | use:
5 | - DEFAULT
6 | except: [
7 | PACKAGE_VERSION_SUFFIX
8 | ]
9 |
10 |
--------------------------------------------------------------------------------
/proto/rig/k8s.io/api/autoscaling/v2/generated.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package k8s.io.api.autoscaling.v2;
4 |
5 | message CrossVersionObjectReference {
6 | string kind = 1;
7 | string name = 2;
8 | string apiVersion = 3;
9 | }
10 |
--------------------------------------------------------------------------------
/proto/rig/k8s.io/apimachinery/pkg/api/resource/generated.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package k8s.io.apimachinery.pkg.api.resource;
4 |
5 | message Quantity {
6 | string string = 1;
7 | }
8 |
--------------------------------------------------------------------------------
/proto/rig/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package k8s.io.apimachinery.pkg.apis.meta.v1;
4 |
5 | message TypeMeta {
6 | string kind = 1;
7 | string aPIVersion = 2;
8 | }
9 |
--------------------------------------------------------------------------------
/proto/rig/model/auth.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | // The LoginType enum defines the type of login.
6 | enum LoginType {
7 | // Default value.
8 | LOGIN_TYPE_UNSPECIFIED = 0;
9 | // Email and password login.
10 | LOGIN_TYPE_EMAIL_PASSWORD = 1;
11 | // deprecated: text is not supported - Phone number and password login.
12 | LOGIN_TYPE_PHONE_PASSWORD = 2;
13 | // Username and password login.
14 | LOGIN_TYPE_USERNAME_PASSWORD = 3;
15 | // SSO Login
16 | LOGIN_TYPE_SSO = 4;
17 | }
18 |
19 | // Message that tells how the user was authenticated.
20 | message AuthMethod {
21 | oneof method {
22 | LoginType login_type = 1;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/proto/rig/model/author.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | // Author of a change.
6 | message Author {
7 | // Cached identifier of the author, e.g. email or username at the time of
8 | // change.
9 | string identifier = 1;
10 | // Cached pretty-printed name of the author at the time of
11 | // change.
12 | string printable_name = 2;
13 | // User ID of the author. This should be used to get current information
14 | // about the author.
15 | oneof account {
16 | // if a user did the change
17 | string user_id = 3;
18 | // if a service account did the change
19 | string service_account_id = 4;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/proto/rig/model/credentials.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | // Generic credentials model.
6 | message ProviderCredentials {
7 | // Public key.
8 | string public_key = 1;
9 | // Private key.
10 | string private_key = 2;
11 | }
12 |
--------------------------------------------------------------------------------
/proto/rig/model/environment.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | message EnvironmentFilter {
6 | message All {
7 | bool include_ephemeral = 1;
8 | }
9 |
10 | message Selected {
11 | repeated string environment_ids = 1;
12 | }
13 |
14 | oneof filter {
15 | All all = 1;
16 | Selected selected = 2;
17 | }
18 | }
--------------------------------------------------------------------------------
/proto/rig/model/id.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | message CapsuleID {
6 | string project = 1;
7 | string environment = 2;
8 | string capsule = 3;
9 | }
10 |
11 | message CapsuleSetID {
12 | string project = 1;
13 | string capsule = 2;
14 | }
15 |
--------------------------------------------------------------------------------
/proto/rig/model/metadata.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | // Generic metadata model.
6 | message Metadata {
7 | // Key of the metadata.
8 | string key = 1;
9 | // Value of the metadata.
10 | bytes value = 2;
11 | }
12 |
--------------------------------------------------------------------------------
/proto/rig/model/notification.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package model;
4 |
5 | import "model/environment.proto";
6 |
7 | message NotificationNotifier {
8 | NotificationTarget target = 1;
9 | repeated NotificationTopic topics = 2;
10 | model.EnvironmentFilter environments = 3;
11 | }
12 |
13 | message NotificationTarget {
14 | message SlackTarget {
15 | string workspace = 1;
16 | string channel_id = 2;
17 | }
18 |
19 | message EmailTarget {
20 | string id = 1;
21 | string from_email = 2;
22 | repeated string to_emails = 3;
23 | }
24 |
25 | oneof target {
26 | SlackTarget slack = 1;
27 | EmailTarget email = 2;
28 | }
29 | }
30 |
31 | enum NotificationTopic {
32 | NOTIFICATION_TOPIC_UNSPECIFIED = 0;
33 | NOTIFICATION_TOPIC_ROLLOUT = 1;
34 | NOTIFICATION_TOPIC_ISSUE = 2;
35 | NOTIFICATION_TOPIC_PROJECT = 3;
36 | NOTIFICATION_TOPIC_ENVIRONMENT = 4;
37 | NOTIFICATION_TOPIC_CAPSULE = 5;
38 | NOTIFICATION_TOPIC_USER = 6;
39 | }
40 |
--------------------------------------------------------------------------------
/proto/rig/operator/api/v1/capabilities/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.capabilities;
4 |
5 | import "config/v1alpha1/generated.proto";
6 |
7 | // The service for getting operator capabilities
8 | service Service {
9 | rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {}
10 | rpc Get(GetRequest) returns (GetResponse) {}
11 | rpc GetPlugins(GetPluginsRequest) returns (GetPluginsResponse) {}
12 | }
13 |
14 | message GetRequest {}
15 |
16 | message GetResponse {
17 | bool ingress = 1;
18 | bool has_prometheus_service_monitor = 2;
19 | bool has_custom_metrics = 3;
20 | bool has_vertical_pod_autoscaler = 4;
21 | }
22 |
23 | message GetConfigRequest {}
24 |
25 | message GetConfigResponse {
26 | string yaml = 1;
27 | config.v1alpha1.OperatorConfig operator_config = 2;
28 | string operator_version = 3;
29 | string k8s_version = 4;
30 | }
31 |
32 | message GetPluginsRequest {}
33 |
34 | message GetPluginsResponse {
35 | message Builtin {
36 | string name = 1;
37 | }
38 |
39 | message Thirdparty {
40 | string name = 1;
41 | string image = 2;
42 | }
43 |
44 | message Plugin {
45 | oneof plugin {
46 | Builtin builtin = 1;
47 | Thirdparty third_party = 2;
48 | }
49 | }
50 |
51 | repeated Plugin plugins = 1;
52 | }
53 |
--------------------------------------------------------------------------------
/proto/rig/operator/api/v1/cluster/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package api.v1.operator.cluster;
4 |
5 | import "model/metrics.proto";
6 |
7 | service Service {
8 | rpc GetNodes(GetNodesRequest) returns (GetNodesResponse) {}
9 | rpc GetNodePods(GetNodePodsRequest) returns (GetNodePodsResponse) {}
10 | }
11 |
12 | message GetNodesRequest {}
13 |
14 | message GetNodesResponse {
15 | repeated Node nodes = 1;
16 | }
17 |
18 | message Node {
19 | string node_name = 1;
20 | model.Resources allocateable = 2;
21 | model.Resources usage = 3;
22 | }
23 |
24 | message GetNodePodsRequest {
25 | string node_name = 1;
26 | }
27 |
28 | message GetNodePodsResponse {
29 | repeated Pod pods = 1;
30 | }
31 |
32 | message Pod {
33 | string pod_name = 1;
34 | string namespace = 2;
35 | model.Resources requested = 3;
36 | string capsule_name = 4;
37 | }
38 |
--------------------------------------------------------------------------------
/scripts/crdcopy.py:
--------------------------------------------------------------------------------
1 | s = "\n versions:\n"
2 |
3 | with open("deploy/charts/rig-operator/templates/crd.yaml") as f:
4 | helm_data = f.read()
5 | helm_idx = helm_data.find(s) + len(s)
6 | helm_data = helm_data[:helm_idx]
7 |
8 | with open("deploy/kustomize/crd/bases/rig.dev_capsules.yaml") as f:
9 | crd_data = f.read()
10 | crd_idx = crd_data.find(s) + len(s)
11 | crd_data = crd_data[crd_idx:]
12 |
13 | result = helm_data + crd_data + "{{- end }}\n"
14 | with open("deploy/charts/rig-operator/templates/crd.yaml", "w") as f:
15 | f.write(result)
16 |
--------------------------------------------------------------------------------
/tools/go.work:
--------------------------------------------------------------------------------
1 | go 1.23
2 |
3 | use .
4 |
--------------------------------------------------------------------------------
/tools/readme_truncate.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 |
4 | def truncate(path: str):
5 | try:
6 | with open(path) as f:
7 | contents = f.read()
8 | idx = contents.index("## Config")
9 | except:
10 | return
11 |
12 | contents = contents[:idx]
13 | with open(path, "w") as f:
14 | f.write(contents)
15 |
16 |
17 | if __name__ == "__main__":
18 | path = sys.argv[1]
19 | truncate(path)
20 |
--------------------------------------------------------------------------------
/tools/tools.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | _ "connectrpc.com/connect/cmd/protoc-gen-connect-go"
5 | _ "github.com/bufbuild/buf/cmd/buf"
6 | _ "github.com/elastic/crd-ref-docs"
7 | _ "github.com/golangci/golangci-lint/cmd/golangci-lint"
8 | _ "github.com/goreleaser/goreleaser"
9 | _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
10 | _ "github.com/vektra/mockery/v2"
11 | _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
12 | _ "google.golang.org/protobuf/cmd/protoc-gen-go"
13 | _ "gotest.tools/gotestsum"
14 | _ "sigs.k8s.io/controller-runtime/tools/setup-envtest"
15 | _ "sigs.k8s.io/controller-tools/cmd/controller-gen"
16 | _ "sigs.k8s.io/kind"
17 | )
18 |
--------------------------------------------------------------------------------