Documentation ¶
Overview ¶
Package geryon contains a GitHub App for Kubernetes clusters
It automatically creates namespaces for each GitHub Repository the app is installed on, and automatically syncs ImagePullSecrets for GitHub's Package Registry
Index ¶
Constants ¶
const ( // InstallationIDAnnotation is added to all namespaces created by geryon InstallationIDAnnotation = "urcomputeringpal.com/geryon-installation-id" // ImagePullSyncAnnotation is used to determine whether or not to sync secrets on a namespace ImagePullSyncAnnotation = "urcomputeringpal.com/geryon-sync-image-pull-secrets" // ImagePullSyncTimestampAnnotation is added to the secret and is updated when it is synced ImagePullSyncTimestampAnnotation = "urcomputeringpal.com/geryon-image-pull-secrets-sync-timestamp" // DockerSecretName is the name of the secret containing Docker credentials DockerSecretName = "github-package-registry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WebhookPort int GitHubAppID int GitHubAppPrivateKeyFile string GithubAppWebHookSecret string Kubeconfig string InstallationResyncInterval time.Duration NamespaceResyncInterval time.Duration Threadiness int }
Config contains the configuration for a Geryon controller
type Geryon ¶
type Geryon struct { GithubAppsClient *github.Client KubernetesClient *kubernetes.Clientset NamespaceInformerCache cache.Store Config Config // contains filtered or unexported fields }
Geryon is a Kubernetes controller that keeps your cluster in sync with your GitHub account. At its core, it's a GitHub Client, a Kubernetes client, a work queue, and a bunch of workers.
func (*Geryon) ResyncInstallationNamespaces ¶
func (g *Geryon) ResyncInstallationNamespaces()
ResyncInstallationNamespaces loads a list of Installations and Repositories from GitHub and queues up a call to SyncNamespace for each. Run calls this every Config.InstallationResyncInterval
func (*Geryon) ResyncManagedNamespaces ¶
func (g *Geryon) ResyncManagedNamespaces()
ResyncManagedNamespaces loads a list of all namespaces that were created by Geryon and queues up a call to SyncNamespace for each every Config.NamespaceResyncInterval
func (*Geryon) SyncNamespace ¶
SyncNamespace ensures a Namespace exists for each Installation, and that it's default ServiceAccount has be configured with imagePullSecrets for the GitHub Package Registry