Documentation ¶
Index ¶
- Variables
- func BuildAndTagImage(ctxDir, dockerfilePath, imageName string) (string, error)
- func CreatePod(clientset *kubernetes.Clientset, name, password string) corev1.Pod
- func CreateService(clientset *kubernetes.Clientset, name string) corev1.Service
- func GenerateIngressRules(clientset *kubernetes.Clientset, number int)
- func GeneratePassword() string
- func GetServicePodMetrics(clientset *kubernetes.Clientset, metricsClient *metrics.Clientset, ...) (*metricsv1beta1.PodMetricsList, error)
- func NewIngressRule(domain, serviceName string, port int32) *networkingv1.IngressRule
- func NewXCtfDeployment(container, name, configMapName string, port int32, oc openai.Config) *appsv1.Deployment
- type Config
- type Service
- func (s *Service) DeleteDeployment(ctx context.Context, c *connect.Request[kubes.DeleteDeploymentRequest]) (*connect.Response[kubes.DeleteDeploymentResponse], error)
- func (s *Service) ListDeployments(ctx context.Context, c *connect.Request[kubes.ListDeploymentsRequest]) (*connect.Response[kubes.ListDeploymentsResponse], error)
- func (s *Service) NewDeployment(ctx context.Context, c *connect.Request[kubes.NewDeploymentRequest]) (*connect.Response[kubes.NewDeploymentResponse], error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( New, NewConfig, )
Functions ¶
func BuildAndTagImage ¶
func CreateService ¶
func CreateService(clientset *kubernetes.Clientset, name string) corev1.Service
func GenerateIngressRules ¶
func GenerateIngressRules(clientset *kubernetes.Clientset, number int)
GenerateIngressRules creates ingress rules for the specified number of hosts
func GeneratePassword ¶
func GeneratePassword() string
GeneratePassword creates a random 16-character alphanumeric password
func GetServicePodMetrics ¶
func GetServicePodMetrics(clientset *kubernetes.Clientset, metricsClient *metrics.Clientset, namespace, serviceName string) (*metricsv1beta1.PodMetricsList, error)
func NewIngressRule ¶
func NewIngressRule(domain, serviceName string, port int32) *networkingv1.IngressRule
func NewXCtfDeployment ¶
Types ¶
type Config ¶
type Config struct { Enabled bool `yaml:"enabled"` Container string `yaml:"container"` DefaultNamespace string `yaml:"default_namespace"` DefaultIngress string `yaml:"default_ingress"` GcsAccount string `yaml:"gcs_account"` }
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) DeleteDeployment ¶
func (s *Service) DeleteDeployment(ctx context.Context, c *connect.Request[kubes.DeleteDeploymentRequest]) (*connect.Response[kubes.DeleteDeploymentResponse], error)
func (*Service) ListDeployments ¶
func (s *Service) ListDeployments(ctx context.Context, c *connect.Request[kubes.ListDeploymentsRequest]) (*connect.Response[kubes.ListDeploymentsResponse], error)
func (*Service) NewDeployment ¶
func (s *Service) NewDeployment(ctx context.Context, c *connect.Request[kubes.NewDeploymentRequest]) (*connect.Response[kubes.NewDeploymentResponse], error)
Click to show internal directories.
Click to hide internal directories.