Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Flux with HTTP proxy #2662

Closed
ssimk0 opened this issue Dec 6, 2019 · 2 comments
Closed

Flux with HTTP proxy #2662

ssimk0 opened this issue Dec 6, 2019 · 2 comments
Labels

Comments

@ssimk0
Copy link

ssimk0 commented Dec 6, 2019

Describe the bug
Hi, we want use new feature from flux v1.15.0 to where we can use git repository with HTTP #2470, but also with HTTP proxy. All is setuped correctly becasue we can clone repo inside the flux container, but flux itself have issue there.

To Reproduce
Steps to reproduce the behaviour:
0. What's your setup?
start flux
with args:

      --manifest-generation=true
      --memcached-hostname=flux-memcached
      --memcached-service=
      --automation-interval=5m
      --log-format=fmt
      --k8s-secret-name=flux-git-deploy
      --git-url=https://$(GIT_AUTHUSER):$(GIT_AUTHKEY)@repo.git
      --git-branch=master
      --git-path=clusters/preprod/
      --git-sync-tag=flux-sync-preprod
      --git-user=Flux preprod
      --git-email=flux-preprod@example.com
      --git-poll-interval=5m
      --git-timeout=20s
      --git-ci-skip=false
      --git-readonly=false
      --registry-rps=200
      --registry-burst=125
      --registry-trace=false
      --registry-poll-interval=5m
      --sync-interval=5m
      --sync-state=git
      --ssh-keygen-dir=/var/fluxd/keygen

and ENV

      HTTP_PROXY:   http://x.x.x.x:3128/
      HTTPS_PROXY:  http://x.x.x.x:3128/
      NO_PROXY:     127.0.0.1
  1. apply configuration

Expected behavior
Flux will be able pull repository through proxy

Logs


Flag --registry-poll-interval has been deprecated, changed to --automation-interval, use that instead
ts=2019-12-06T09:50:03.813701115Z caller=main.go:248 version=1.16.0
ts=2019-12-06T09:50:03.813749649Z caller=main.go:383 msg="using in cluster config to connect to the cluster"
ts=2019-12-06T09:50:03.833429625Z caller=main.go:474 host=https://10.43.0.1:443 version=kubernetes-v1.16.3-k3s.2
ts=2019-12-06T09:50:03.833540214Z caller=main.go:486 kubectl=/usr/local/bin/kubectl
ts=2019-12-06T09:50:03.833978115Z caller=main.go:498 ping=true
ts=2019-12-06T09:50:03.835891936Z caller=main.go:633 url=https://..../.git user="Flux preprod" email=flux-devops@adap.tw signing-key= verify-signatures=false sync-tag=flux-sync-preprod state=git readonly=false notes-ref=flux set-author=false git-secret=false
ts=2019-12-06T09:50:03.835933683Z caller=main.go:736 upstream="no upstream URL given"
ts=2019-12-06T09:50:03.836357689Z caller=main.go:757 addr=:3030
ts=2019-12-06T09:50:03.854209809Z caller=loop.go:101 component=sync-loop err="git repo not ready: git repo has not been cloned yet"
ts=2019-12-06T09:50:03.854280466Z caller=images.go:17 component=sync-loop msg="polling for new images for automated workloads"
ts=2019-12-06T09:50:03.854326951Z caller=images.go:27 component=sync-loop msg="no automated workloads"
ts=2019-12-06T09:50:04.449922635Z caller=checkpoint.go:24 component=checkpoint msg="up to date" latest=1.16.0

Additional context
Add any other context about the problem here, e.g

  • Flux version: 1.16.0
  • Helm Operator version: -
  • Kubernetes version: v1.16.3
  • Git provider: Self-hosted gitlab
  • Container registry provider: docker.io (flux) self-hosted(apps)
@ssimk0 ssimk0 added blocked-needs-validation Issue is waiting to be validated before we can proceed bug labels Dec 6, 2019
@2opremio
Copy link
Contributor

2opremio commented Dec 6, 2019

and ENV

      HTTP_PROXY:   http://x.x.x.x:3128/
      HTTPS_PROXY:  http://x.x.x.x:3128/
      NO_PROXY:     127.0.0.1

Please use lowercase env variables (e.g. http_proxy instead of HTTP_PROXY).

We should probably accept both though. I will create a PR with that.

@2opremio 2opremio added question and removed blocked-needs-validation Issue is waiting to be validated before we can proceed bug labels Dec 6, 2019
@2opremio
Copy link
Contributor

2opremio commented Dec 9, 2019

It turns out Git follows Curl's conventions, so it doesn't accept the uppercase HTTP_PROXY env variable (see #2665 (comment)). Thus, I am surprised you managed to get the clone working inside the flux container.

@2opremio 2opremio closed this as completed Dec 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants