id stringlengths 2 7 | text stringlengths 17 51.2k | title stringclasses 1
value |
|---|---|---|
c161900 |
out := new(ApplicationTree)
in.DeepCopyInto(out)
return out
} | |
c161901 | if in == nil {
return nil
}
out := new(ApplicationWatchEvent)
in.DeepCopyInto(out)
return out
} | |
c161902 |
out := new(ClusterConfig)
in.DeepCopyInto(out)
return out
} | |
c161903 | := new(Command)
in.DeepCopyInto(out)
return out
} | |
c161904 | out := new(ComparedTo)
in.DeepCopyInto(out)
return out
} | |
c161905 | }
out := new(ComponentParameter)
in.DeepCopyInto(out)
return out
} | |
c161906 | if in == nil {
return nil
}
out := new(ConfigManagementPlugin)
in.DeepCopyInto(out)
return out
} | |
c161907 |
out := new(ConnectionState)
in.DeepCopyInto(out)
return out
} | |
c161908 |
out := new(HealthStatus)
in.DeepCopyInto(out)
return out
} | |
c161909 |
out := new(HelmParameter)
in.DeepCopyInto(out)
return out
} | |
c161910 |
out := new(HelmRepository)
in.DeepCopyInto(out)
return out
} | |
c161911 | out := new(InfoItem)
in.DeepCopyInto(out)
return out
} | |
c161912 | out := new(JWTToken)
in.DeepCopyInto(out)
return out
} | |
c161913 | out := new(JsonnetVar)
in.DeepCopyInto(out)
return out
} | |
c161914 | }
out := new(KsonnetParameter)
in.DeepCopyInto(out)
return out
} | |
c161915 | }
out := new(KustomizeImageTag)
in.DeepCopyInto(out)
return out
} | |
c161916 | out := new(Operation)
in.DeepCopyInto(out)
return out
} | |
c161917 |
out := new(OperationState)
in.DeepCopyInto(out)
return out
} | |
c161918 | out := new(ProjectRole)
in.DeepCopyInto(out)
return out
} | |
c161919 | out := new(Repository)
in.DeepCopyInto(out)
return out
} | |
c161920 |
out := new(RepositoryList)
in.DeepCopyInto(out)
return out
} | |
c161921 |
out := new(ResourceAction)
in.DeepCopyInto(out)
return out
} | |
c161922 |
if in == nil {
return nil
}
out := new(ResourceActionDefinition)
in.DeepCopyInto(out)
return out
} | |
c161923 | }
out := new(ResourceActionParam)
in.DeepCopyInto(out)
return out
} | |
c161924 |
out := new(ResourceActions)
in.DeepCopyInto(out)
return out
} | |
c161925 |
out := new(ResourceDiff)
in.DeepCopyInto(out)
return out
} | |
c161926 |
if in == nil {
return nil
}
out := new(ResourceIgnoreDifferences)
in.DeepCopyInto(out)
return out
} | |
c161927 | if in == nil {
return nil
}
out := new(ResourceNetworkingInfo)
in.DeepCopyInto(out)
return out
} | |
c161928 |
out := new(ResourceNode)
in.DeepCopyInto(out)
return out
} | |
c161929 | }
out := new(ResourceOverride)
in.DeepCopyInto(out)
return out
} | |
c161930 | out := new(ResourceRef)
in.DeepCopyInto(out)
return out
} | |
c161931 |
out := new(ResourceResult)
in.DeepCopyInto(out)
return out
} | |
c161932 |
out := new(ResourceStatus)
in.DeepCopyInto(out)
return out
} | |
c161933 |
out := new(RevisionHistory)
in.DeepCopyInto(out)
return out
} | |
c161934 |
out := new(SyncOperation)
in.DeepCopyInto(out)
return out
} | |
c161935 | if in == nil {
return nil
}
out := new(SyncOperationResource)
in.DeepCopyInto(out)
return out
} | |
c161936 | }
out := new(SyncOperationResult)
in.DeepCopyInto(out)
return out
} | |
c161937 | out := new(SyncPolicy)
in.DeepCopyInto(out)
return out
} | |
c161938 | }
out := new(SyncPolicyAutomated)
in.DeepCopyInto(out)
return out
} | |
c161939 | out := new(SyncStatus)
in.DeepCopyInto(out)
return out
} | |
c161940 |
out := new(SyncStrategy)
in.DeepCopyInto(out)
return out
} | |
c161941 | }
out := new(SyncStrategyApply)
in.DeepCopyInto(out)
return out
} | |
c161942 | }
out := new(SyncStrategyHook)
in.DeepCopyInto(out)
return out
} | |
c161943 | errors.CheckError(err)
ctxName = string(prevCtxBytes)
}
localCfg, err := localconfig.ReadLocalConfig(clientOpts.ConfigPath)
errors.CheckError(err)
if localCfg.CurrentContext == ctxName {
fmt.Printf("Already at context '%s'\n", localCfg.CurrentContext)
return
}
if _, err = localCfg.Reso... | |
c161944 | return &clientSet{address: address, timeoutSeconds: timeoutSeconds}
} | |
c161945 | }
}
return nil, -1, fmt.Errorf("role '%s' does not exist in project '%s'", name, proj.Name)
} | |
c161946 | nil, -1, err
}
for i, token := range role.JWTTokens {
if issuedAt == token.IssuedAt {
return &token, i, nil
}
}
return nil, -1, fmt.Errorf("JWT token for role '%s' issued at '%d' does not exist in project '%s'", role.Name, issuedAt, proj.Name)
} | |
c161947 | status.Errorf(codes.InvalidArgument, "policy syntax error: %s", err.Error())
}
return nil
} | |
c161948 | if group == roleGroup {
return false, nil
}
}
role.Groups = append(role.Groups, group)
p.Spec.Roles[roleIndex] = *role
return true, nil
} | |
c161949 |
normalizedPolicies = append(normalizedPolicies, normalizePolicy(policy))
}
p.Spec.Roles[i].Policies = normalizedPolicies
}
} | |
c161950 | nil {
return "", err
}
fmt.Print("\n")
if string(password) == string(confirmPassword) {
return string(password), nil
}
log.Error("Passwords do not match")
}
} | |
c161951 | os.Getenv("FORCE_LOG_COLORS") == "1" {
log.SetFormatter(&log.TextFormatter{ForceColors: true})
}
} | |
c161952 |
_ = flag.Lookup("v").Value.Set(strconv.Itoa(glogLevel))
} | |
c161953 | return RegisterRepositoryServiceHandlerClient(ctx, mux, NewRepositoryServiceClient(conn))
} | |
c161954 |
return RegisterSessionServiceHandlerClient(ctx, mux, NewSessionServiceClient(conn))
} | |
c161955 | master group name.")
return func() (*Cache, error) {
password := os.Getenv(envRedisPassword)
if len(sentinelAddresses) > 0 {
client := redis.NewFailoverClient(&redis.FailoverOptions{
MasterName: sentinelMaster,
SentinelAddrs: sentinelAddresses,
DB: redisDB,
Password: password... | |
c161956 | return &SessionResponse{Token: ""}, nil
} | |
c161957 |
return RegisterClusterServiceHandlerClient(ctx, mux, NewClusterServiceClient(conn))
} | |
c161958 | {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.AppProject))
})
return ret, err
} | |
c161959 | {
return appProjectNamespaceLister{indexer: s.indexer, namespace: namespace}
} | |
c161960 | {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.AppProject))
})
return ret, err
} | |
c161961 | live.Object)
}
gjDiff := gojsondiff.New().CompareObjects(liveObj, configObj)
dr := DiffResult{
Diff: gjDiff,
Modified: gjDiff.Modified(),
}
return &dr
} | |
c161962 | config, live)
if err != nil {
return nil, err
}
// 2. apply the patch against the live object
liveBytes, err := json.Marshal(live)
if err != nil {
return nil, err
}
versionedObject, err := scheme.Scheme.New(orig.GroupVersionKind())
if err != nil {
return nil, err
}
patchedLiveBytes, err := strategicpa... | |
c161963 | }
diffResultList := DiffResultList{
Diffs: make([]DiffResult, numItems),
}
for i := 0; i < numItems; i++ {
config := configArray[i]
live := liveArray[i]
diffRes := Diff(config, live, normalizer)
diffResultList.Diffs[i] = *diffRes
if diffRes.Modified {
diffResultList.Modified = true
}
}
return &d... | |
c161964 | errors.New("Supplied nil left object")
}
asciiFmt := formatter.NewAsciiFormatter(left.Object, formatOpts)
return asciiFmt.Format(d.Diff)
} | |
c161965 | len(v) == 0 {
secret.Data[k] = []byte("")
}
}
if len(secret.StringData) > 0 {
if secret.Data == nil {
secret.Data = make(map[string][]byte)
}
for k, v := range secret.StringData {
secret.Data[k] = []byte(v)
}
delete(un.Object, "stringData")
}
newObj, err := runtime.DefaultUnstructuredConverter... | |
c161966 | jsonFmt := formatter.NewDeltaFormatter()
return jsonFmt.Format(d.Diff)
} | |
c161967 | valToReplacement[val] = replacement
}
data[k] = replacement
err := unstructured.SetNestedField(obj.Object, data, "data")
if err != nil {
return nil, nil, err
}
}
}
if live != nil && orig != nil {
annotations := live.GetAnnotations()
if annotations == nil {
annotations = make(map[string... | |
c161968 | != nil {
resStatuses[i].Health = resHealth
// Don't allow resource hooks to affect health status
isHook := liveObj != nil && hookutil.IsHook(liveObj)
if !isHook && IsWorse(appHealth.Status, resHealth.Status) {
appHealth.Status = resHealth.Status
}
}
}
return &appHealth, savedErr
} | |
c161969 | case "Application":
health, err = getApplicationHealth(obj)
}
case "":
switch gvk.Kind {
case kube.ServiceKind:
health, err = getServiceHealth(obj)
case kube.PersistentVolumeClaimKind:
health, err = getPVCHealth(obj)
case kube.PodKind:
health, err = getPodHealth(obj)
}
case "batch":
switch ... | |
c161970 | }
if new == code {
newIndex = i
}
}
return newIndex > currentIndex
} | |
c161971 | *http.Request) {
if err := f(); err != nil {
w.WriteHeader(http.StatusServiceUnavailable)
log.Errorln(w, err)
} else {
fmt.Fprintln(w, "ok")
}
})
} | |
c161972 | &ArgoCDRepoServer{
log: serverLog,
gitFactory: gitFactory,
cache: cache,
parallelismLimit: parallelismLimit,
opts: []grpc.ServerOption{
grpc.Creds(credentials.NewTLS(tlsConfig)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(unaryInterceptors...)),
grpc.StreamI... | |
c161973 |
repository.RegisterRepoServerServiceServer(server, manifestService)
// Register reflection service on gRPC server.
reflection.Register(server)
return server
} | |
c161974 |
return RegisterAccountServiceHandlerClient(ctx, mux, NewAccountServiceClient(conn))
} | |
c161975 | i := range s.Repositories {
urls[i] = s.Repositories[i].URL
}
return urls, nil
} | |
c161976 | {
data[username] = []byte(r.Username)
}
if r.Password != "" {
data[password] = []byte(r.Password)
}
if r.SSHPrivateKey != "" {
data[sshPrivateKey] = []byte(r.SSHPrivateKey)
}
repoInfo := settings.RepoCredentials{
URL: r.Repo,
InsecureIgnoreHostKey: r.InsecureIgnoreHostKey,
}
err = ... | |
c161977 | credential, err := db.credentialsToRepository(s.RepositoryCredentials[index])
if err != nil {
return nil, err
} else {
log.WithFields(log.Fields{"repoURL": repo.Repo, "credUrl": credential.Repo}).Info("copying credentials")
repo.CopyCredentialsFrom(*credential)
}
}
}
return repo, err
} | |
c161978 |
repoInfo := s.Repositories[index]
err = db.updateSecrets(&repoInfo, r)
if err != nil {
return nil, err
}
s.Repositories[index] = repoInfo
err = db.settingsMgr.SaveSettings(s)
if err != nil {
return nil, err
}
return r, nil
} | |
c161979 | locks: map[string]*sync.Mutex{},
}
} | |
c161980 | &helm{path: path, helmRepos: helmRepos}
} | |
c161981 | {
return nil, err
}
var mapClaims jwtgo.MapClaims
err = json.Unmarshal(claimsBytes, &mapClaims)
if err != nil {
return nil, err
}
return mapClaims, nil
} | |
c161982 | ok := fieldIf.(string); ok {
return field
}
}
return ""
} | |
c161983 | groupIf := range groupIfList {
group, ok := groupIf.(string)
if ok {
groups = append(groups, group)
}
}
return groups
} | |
c161984 |
case int64:
return iat, nil
default:
return 0, fmt.Errorf("iat '%v' is not a number", iat)
}
} | |
c161985 | }
command.AddCommand(NewRepoAddCommand(clientOpts))
command.AddCommand(NewRepoListCommand(clientOpts))
command.AddCommand(NewRepoRemoveCommand(clientOpts))
return command
} | |
c161986 | := repoIf.Create(context.Background(), &repoCreateReq)
errors.CheckError(err)
fmt.Printf("repository '%s' added\n", createdRepo.Repo)
},
}
command.Flags().StringVar(&repo.Username, "username", "", "username to the repository")
command.Flags().StringVar(&repo.Password, "password", "", "password to the reposi... | |
c161987 | 0 {
c.HelpFunc()(c, args)
os.Exit(1)
}
conn, repoIf := argocdclient.NewClientOrDie(clientOpts).NewRepoClientOrDie()
defer util.Close(conn)
for _, repoURL := range args {
_, err := repoIf.Delete(context.Background(), &repository.RepoQuery{Repo: repoURL})
errors.CheckError(err)
}
},
}
... | |
c161988 | defer util.Close(conn)
repos, err := repoIf.List(context.Background(), &repository.RepoQuery{})
errors.CheckError(err)
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
fmt.Fprintf(w, "REPO\tUSER\tSTATUS\tMESSAGE\n")
for _, r := range repos.Items {
fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", r.Repo, r.Us... | |
c161989 | {
if v == verb {
return true
}
}
return false
} | |
c161990 | err != nil {
return nil, err
}
apiResource, err := ServerResourceForGroupVersionKind(disco, gvk)
if err != nil {
return nil, err
}
resource := gvk.GroupVersion().WithResource(apiResource.Name)
resourceIf := ToResourceInterface(dynamicIf, apiResource, resource, namespace)
return resourceIf.Get(name, metav1.G... | |
c161991 | }
resource := gvk.GroupVersion().WithResource(apiResource.Name)
resourceIf := ToResourceInterface(dynamicIf, apiResource, resource, namespace)
return resourceIf.Patch(name, patchType, patchBytes, metav1.UpdateOptions{})
} | |
c161992 | if err != nil {
return err
}
resource := gvk.GroupVersion().WithResource(apiResource.Name)
resourceIf := ToResourceInterface(dynamicIf, apiResource, resource, namespace)
propagationPolicy := metav1.DeletePropagationForeground
deleteOptions := &metav1.DeleteOptions{PropagationPolicy: &propagationPolicy}
if forc... | |
c161993 | this for dryRuns.
if !dryRun && namespace != "" {
kubeClient, err := kubernetes.NewForConfig(config)
if err != nil {
return "", err
}
_, err = kubeClient.CoreV1().Namespaces().Get(namespace, metav1.GetOptions{})
if err != nil {
return "", err
}
}
outReconcile, err := runKubectl(f.Name()... | |
c161994 | if err != nil {
return nil, err
}
resourceOverrides, err := getResourceOverridesFromConfigMap(argoCDCM)
if err != nil {
return nil, err
}
return resourceOverrides, nil
} | |
c161995 |
var errs []error
if err := updateSettingsFromConfigMap(&settings, argoCDCM); err != nil {
errs = append(errs, err)
}
if err := updateSettingsFromSecret(&settings, argoCDSecret); err != nil {
errs = append(errs, err)
}
if len(errs) > 0 {
return &settings, errs[0]
}
return &settings, nil
} | |
c161996 | bitbucketWebhookUUID := argoCDSecret.Data[settingsWebhookBitbucketUUIDKey]; len(bitbucketWebhookUUID) > 0 {
settings.WebhookBitbucketUUID = string(bitbucketWebhookUUID)
}
serverCert, certOk := argoCDSecret.Data[settingServerCertificate]
serverKey, keyOk := argoCDSecret.Data[settingServerPrivateKey]
if certOk &&... | |
c161997 | clientset: clientset,
namespace: namespace,
mutex: &sync.Mutex{},
}
return mgr
} | |
c161998 | a.OIDCConfig() != nil {
return true
}
return false
} | |
c161999 | pemCertBytes, _ := tlsutil.EncodeX509KeyPair(*a.Certificate)
ok := certPool.AppendCertsFromPEM(pemCertBytes)
if !ok {
panic("bad certs")
}
return &tls.Config{
RootCAs: certPool,
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.