mirror of
https://github.com/labring/sealos.git
synced 2026-09-21 13:51:32 +08:00
feature(main): fix image pull for user-controller (#1857)
Signed-off-by: cuisongliu <cuisongliu@qq.com> Signed-off-by: cuisongliu <cuisongliu@qq.com>
This commit is contained in:
@@ -33,6 +33,7 @@ spec:
|
||||
cpu: 5m
|
||||
memory: 64Mi
|
||||
- name: manager
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- "--health-probe-bind-address=:8081"
|
||||
- "--metrics-bind-address=127.0.0.1:8080"
|
||||
|
||||
@@ -112,7 +112,7 @@ func (r *AccountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
|
||||
if err != nil {
|
||||
return ctrl.Result{}, fmt.Errorf("query order failed: %v", err)
|
||||
}
|
||||
logger.V(1).Info("query order status: %s", status)
|
||||
logger.V(1).Info("query order status", "status", status)
|
||||
switch status {
|
||||
case pay.StatusSuccess:
|
||||
account.Status.ChargeList = append(account.Status.ChargeList, userv1.Charge{
|
||||
|
||||
@@ -114,22 +114,21 @@ func (sac *ServiceAccount) fetchToken(config *rest.Config) (string, error) {
|
||||
}
|
||||
|
||||
func (sac *ServiceAccount) generatorKubeConfig(cfg *rest.Config, token string) (*api.Config, error) {
|
||||
ctx := fmt.Sprintf("%s@%s", sac.User, "kubernetes")
|
||||
// make sure cadata is loaded into config under incluster mode
|
||||
if err := rest.LoadTLSFiles(cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ctx := fmt.Sprintf("%s@%s", sac.User, sac.ClusterName)
|
||||
config := &api.Config{
|
||||
Clusters: map[string]*api.Cluster{
|
||||
"kubernetes": {
|
||||
sac.ClusterName: {
|
||||
Server: GetKubernetesHost(cfg),
|
||||
CertificateAuthorityData: cfg.TLSClientConfig.CAData,
|
||||
},
|
||||
},
|
||||
Contexts: map[string]*api.Context{
|
||||
ctx: {
|
||||
Cluster: "kubernetes",
|
||||
Cluster: sac.ClusterName,
|
||||
AuthInfo: sac.User,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -933,7 +933,7 @@ spec:
|
||||
- secretRef:
|
||||
name: payment-secret
|
||||
image: ghcr.io/labring/user-controller:dev
|
||||
imagePullPolicy: IfNotPresent
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
||||
Reference in New Issue
Block a user