Documentation
¶
Overview ¶
Package postgres provides reconciliation logic for the PostgreSQL database component used by OpenShift Lightspeed for conversation cache storage.
This package manages:
- PostgreSQL deployment and pod lifecycle
- Database initialization and bootstrap secrets
- PersistentVolumeClaim for data persistence
- Service configuration for database access
- ConfigMap for PostgreSQL configuration
- Network policies for database security
- CA certificate management for secure connections
The PostgreSQL instance is used to cache conversation history and maintain session state for the OLS application server. The main entry point is ReconcilePostgres, which ensures all PostgreSQL resources are properly configured.
Index ¶
- func GeneratePostgresBootstrapSecret(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Secret, error)
- func GeneratePostgresConfigMap(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.ConfigMap, error)
- func GeneratePostgresDeployment(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*appsv1.Deployment, error)
- func GeneratePostgresNetworkPolicy(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*networkingv1.NetworkPolicy, error)
- func GeneratePostgresPVC(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.PersistentVolumeClaim, error)
- func GeneratePostgresSecret(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Secret, error)
- func GeneratePostgresService(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Service, error)
- func GetPostgresCAConfigVolume() corev1.Volume
- func GetPostgresCAVolumeMount(mountPath string) corev1.VolumeMount
- func ReconcilePostgres(r reconciler.Reconciler, ctx context.Context, olsconfig *olsv1alpha1.OLSConfig) error
- func UpdatePostgresDeployment(r reconciler.Reconciler, ctx context.Context, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePostgresBootstrapSecret ¶
func GeneratePostgresBootstrapSecret(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Secret, error)
func GeneratePostgresConfigMap ¶
func GeneratePostgresConfigMap(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.ConfigMap, error)
func GeneratePostgresDeployment ¶
func GeneratePostgresDeployment(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*appsv1.Deployment, error)
func GeneratePostgresNetworkPolicy ¶
func GeneratePostgresNetworkPolicy(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*networkingv1.NetworkPolicy, error)
func GeneratePostgresPVC ¶
func GeneratePostgresPVC(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.PersistentVolumeClaim, error)
func GeneratePostgresSecret ¶
func GeneratePostgresSecret(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Secret, error)
func GeneratePostgresService ¶
func GeneratePostgresService(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) (*corev1.Service, error)
func GetPostgresCAVolumeMount ¶
func GetPostgresCAVolumeMount(mountPath string) corev1.VolumeMount
func ReconcilePostgres ¶
func ReconcilePostgres(r reconciler.Reconciler, ctx context.Context, olsconfig *olsv1alpha1.OLSConfig) error
ReconcilePostgres reconciles the Postgres server component
func UpdatePostgresDeployment ¶
func UpdatePostgresDeployment(r reconciler.Reconciler, ctx context.Context, existingDeployment, desiredDeployment *appsv1.Deployment) error
updatePostgresDeployment updates the deployment based on CustomResource configuration.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.