►
Description
Distribution team members demos debugging steps for tests in the GitLab operator.
A
A
A
A
A
Welcome
to
this
week's
distribution
demo,
we
are
one
minute,
Pasty
time,
I'm,
just
going
to
give
it
a
few
more
seconds
in
case.
Someone
else
wants
to
join
next.
Demo
is
about
debugging
gitlab
operator.
A
I
want
to
show
two
different
scenarios:
one
debugging
against
the.
A
Nf
test,
which
is
a
test
environment
and
the
second
one,
is
debugging
gitlab
operator,
while
it
is
running
against
a
fully
functional
cluster,
so
the
second
one
is
actually
more
helpful.
The
first
one
is
helpful
for
development
purposes,
but
the
second
one
is
more
useful
for
finding
the
issues
that's
happening
with
the
deployment
of
gitlab
operator
and
reconciling
the
resources.
A
A
A
This
is
actually
about
the
problems.
I'd
be
happy
to
charge
because
it
leaves
some
of
the
resources
behind.
A
Let's
see
if
I
can
make
this
bigger,
more
visible,
so
I'm
going
to
use
vs
code,
but
basically
you
can
use
delft
if
you
are
using
another
editor.
The
the
commands
are
the
same
I
just
find
it
easier
and
more
quicker
to
to
work
with,
especially
when
I'm
developing
the
operator
so
to
begin
with
I'm
gonna
start
a
test
environment
and
I'm
going
to
debug
one
of
the
test
cases
that
we
have
for
controllers.
A
This
is
the
main
test
that
we
have
here,
so
just
a
quick
overview
of
the
F
test,
which
is
a
test
environment
for
testing
operator.
This.
This
is
part
of
the
gitlab
operator
framework.
Sorry,
this
is
part
of
the
controller
runtime
framework
that
we
use
and
what
it
basically
does.
It
starts
an
etcd
and
a
cube.
A
Api
server,
wires
them
together
and
offers
them
as
an
API
server
to
the
to
the
operator
that
we
are
developing
to
the
controller
that
we
are
developing
and
we
can
do
very
few
basic
basic
tests
with
the
amp
test
with
this
API
server.
But
the
problem
is
that,
since
it
doesn't
have
a
control
plane-
and
it's
just
only
a
test-
API
can
do
only
API
testing,
not
nothing
further,
and
if
we
want
to
add
more
details,
we
need
to
imitate
what
the
control
plane
does.
A
That's
why
our
tests
are
a
bit
slow
and
difficult
to
expand
and
cut
and
catch
Corner
cases,
but
right
now,
I'm
just
going
to
start
one
of
these
test
cases
and
bring
it
into
bring
it
up
into
debug
mode,
and
then
we
can
check
it
so
well.
The
code
that
I
am
reviewing
right
now
is
is
the
setup
of
the
EV
test
you
can
can
refer
to
the
documentation,
but
basically
what
we
do.
A
We
are
collecting
the
crds
and
contribute
the
environment
and
just
started,
and
then,
when
it
starts
here,
it
actually
brings
up
the
processes
outside
the
the
cubic,
the
ACC
theaq
API
server
outside
the
main
process
of
the
controller
itself.
A
A
Operator
sorry
vs
code
configuration,
so
you
just
need
to
start
your
process
in
test
mode,
and
the
program
that
we
are
testing
is
a
test
Suite
test
of
that
particular
package.
So
these
are
the
important
parts
you
need
to
consider
the
program.
This
is
the
main
program
that
we
are
testing
and
this
is
the
home
chart,
the
environment
variable
that
I
am
passing
and
you
can
also
pass
the
key
code
command
line
arguments
actually
I'm
going
to
just
remove.
This
is.
A
A
A
The
background
etcd
is
running
as
well,
and
the
API
Center
is
wired
to
this
one
and
what
this
does
it
creates
a
temp
file,
a
temp
directory,
and
it
contains
all
the
information
that
the
API
server
requires.
So
let's
take
a
look
at
this
directory.
One
of
the
interesting
things
that
is
here
is
the
Q
conflict
file.
A
A
So,
let's
say:
okay:
this
is
a
debugging
environment.
You
can,
of
course,
do
what
you
want
with
the
values
you
can
inspect
them.
You
can
watch
them.
You
can
create
a
conditional.
This
is
a
fully
fledged
debug
environment,
nothing
much
to
it.
The
only
caveat
here
is
that
you
cannot
do
a
lot
of
nested
structures,
basically
any
structures,
the
map,
string,
interface
or
map
of
interfaces.
You
cannot
dig
too
much
into
it.
I
think
a
few
levels
yeah
bill
doesn't
like
it.
A
It
requires
a
bit
of
configuration
of
Dell
and
adding
some
changing
some
buffers.
For
example,
some
of
these
strings
are
cut
short.
These
are
the
parameters
that
you
can
configure
with
little
and
basically,
if
you
are
using
BS
code,
you
can
configure
it
via
vs
code
to
pass
it
to
delve.
So
you
can
get
more.
You
can
read
more
of
the
buffers
or
strings
or
getting
more
nested
picture
of
the
structured
databases,
nested
nested
data
structures,
but
the
foreign.
A
A
A
A
A
A
For
yeah
I
have
two
functions
that
strips
the
I'm
just
gonna
share
it
with.
A
As
a
debug,
a
snippet
in
the
development
documentation,
these
are
useful.
This
one,
the
first
one.
Actually,
the
first
one
finds
the
tab
directory
of
the
API
server.
That
is
running
the
second
one,
just
grabs
the
tries
to
try
to
locate
the
cube,
Cube,
config
and
I
find
myself
this.
You
know
do
this.
A
The
local
API
server
that
is
running
on
this
amp
test
and
try
to
fiddle
with
these
things
sometimes
I
can
even
change
these
things
and
to
make
sure
that
you
know
the
operator.
Actually,
if
you
see
you
see
that
it
operator
system
creating
these
things,
so
this
is
one
of
the
things
that
is
helpful,
but
not
the
most
interesting
thing
that
you
can
do
so.
Just
let's
start
the
debug.
A
A
So
I
think
there's
no
question:
don't
worry,
I'm
just
gonna
grab
these
things.
I'm
gonna
just
create
an
issue
and
add
it
as
a
development
documentation
to
the
operator.
A
So,
as
I
said
that
this
is
this
is
limited,
this
doesn't
have
a
control
plane
and
we
just
basically
testing
the
the
the
development
environment.
But
from
time
to
time
we
find
that
we
need
to
actually
have
a
control
plane
and
find
out
what
is
happening.
I
can
give
you
an
example.
A
few
releases
ago
we
had
a
problem
with
hpas
and
we
really
didn't
understand
what
is
happening
with
hpasd.
A
Any
anything
that
we
were
setting
was
changing
the
number
of
replicas
and
we
had
to
bring
up
the
cluster
into
a
debug,
bring
up
the
operator
into
debug
mode
against
a
real
cluster
and
find
out
what
is
happening
because
we
needed
those
those
my
new
detail,
detailed
information.
A
It
is
running.
There
is
no
GitHub
resource
yet
and
I
want
to
debug
my
operator
against
this
cluster.
This
is
a
gcp
cluster.
Can
do
that
doesn't
matter,
you
can
do
it
with
everything
that
you
want.
A
So
to
begin
with,
now
we
need
to
debug
the
the
main
program,
the
the
actual
GitHub
operator,
so
first
things,
first,
that
the
operator,
when
it
is
deployed
it
has
two
parts.
The
first
part
is
a
service
that
serves
the
web
hook
validating
and
mutating
workbooks.
A
This
is
the
thing
that,
when
you
throw
the
the
gitlab
operator,
gitlab
resource
into
the
cluster
is
called
by
the
API
Machinery
via
the
which
is
configured
via
validating
that
book
and
mutating
workbook
and
is
connected
talks
to
the
controller
as
a
service
and
tries
to
validate
or
change
update,
the
default
values
of
the
resource.
A
So
this
is
the
part
that
does
the
request
and
response
after
this
is
dead.
There
is
another
part
to
operator
which
subscribes
to
watches
certain
resources,
in
this
case
or
for
gitlab
operator,
it
watches
the
gitlab
resource.
So
if
a
gitlab
resource
is
created
or
changed
or
deleted,
it
will
be
notified
and
it
will
pick
it
up.
This
is
kind
of
like
a
pooling
rather
than
pushing,
so
it
can
be
from
the
operator
site.
If
you
look
at
look
at
it
from
the
operator,
so
it
pulls
the
changes
from
the
cluster.
A
For
the
first
part,
we
cannot
really
debug
it
on
our
local
machine
because
we
need
to
have
a
valid
part
sitting
behind
a
service
and
serving
the
validating
web
hook
and
mutated
webbook.
A
A
Doesn't
matter
that
we
have
this.
A
A
A
Okay
and
now
I'm
gonna
delete
the
operator.
So
there
is
no
operator
on
the
cluster
to
reconcile
this.
Let's
take
a
look
at
the
resources
we
have
the
resource
here.
A
A
A
Now
this
is
the
first
step.
The
second
step
is
that
if
I
run
this
into
debug
mode,
it
fails.
Let's
take
a
look.
A
Okay,
the
reason
that
this
phone
can
connect
to
the
remote
cluster
is
that
we
already
have
a
cubicle
that
can
work
with
the
cluster,
so
it
can
still
pull
the
resources.
It
can
watch
the
resources
and
the
the
fact
that
we
are
importing
all
the
authentication
modules,
including
gcp
in
operator,
so
we
can
authenticate
to
gcp
or
any
other
provider.
A
So
with
the
big
Cube
CTL,
we
can
connect
with
a
valid
qctl
on
our
local
machine
on
our
environment
variable
we
can
connect
our
gitlab
operator
to
a
remote
cluster
and
it
works.
The
problem
that
it
doesn't
work
here
is
that
I
think
we
kind
of
need
to
copy
the
certificates,
because
there
is
a
certificate.
A
So
it
looks
at
a
very
specific
directory.
A
A
A
A
The
charts
directory
already
contains
633,
despite
the
fact
that
so
my
test
and
what
my
local
environment
wasn't
exactly
the
same
as
the
remote
environment
it
shouldn't
have
been
here.
I
should
have
updated
the
charts
to
reflect
at
the
exact
same
version
that
is
running
on
the
cluster,
but
actually
this
is
not
that,
because
I
can
go
ahead
and
try
this
thing.
A
Let's
say
I
want
to
see
if
resources
is
enabled-
let's
say
yeah,
let's
say
like
we
want
to,
because
I
check
debuggery
consult
with
this
and
just
let
it
go
and
let's
take
a
look
at
parts
it
is.
It
has
started
creating
everything
the
resources
are
running.
This
is
a
real
cluster
and
the
console
Loop
is
running
as
well,
and
I
can
just
say
waiting
for
a
breakpoint
to
reach
and
I
can
tap
into
it
and
just
see
what
happened.
A
B
A
A
A
A
You
get
the
the
result
that
you
wanted,
but
this
is
a
very
effective
way
of
debugging
the
operator
because
it
is
transparent
and
you
get
all
the
information
that
you
need
and
you
can
see
how
the
operator
is
actually
working
with
a
specific
configuration.
A
So,
the
next
time
that
you
are
trying
to
investigate
an
odd
issue,
this
is
probably
debatable.
A
B
I
think
the
only
question
I
have
and
it's
just
clarification:
we
don't
strip
the
go
binary
of
symbols
or
anything,
so
we
can
just
take
any
of
the
generated
binaries
and
run
them
in
a
debugger
right.
A
V
for
release
for
the
release,
video,
because
this
one
is
actually
compiled
in
debug
mode.
It
has
the
the
the
debug
signals.
So
if
we
take
a
look
at
here,
there
should
be
yeah.
Sorry,
this
is
the
debug
bin
yeah.
There
is
a
debug
version
of
the
binary
here,
but
this
is
not.
It
doesn't
have
to
be
published
because
we
compile
it
locally
right.
We
just
used
a
feature
that
actually
it
levers
a
feature
that
the
controller
runtime
has
and
that's
pulling
the
changes.
A
So
as
long
as
we
can
authenticate
to
a
cluster
the
cube
CTL,
we
can
run
an
operator
locally
against
it.
B
Right
yeah,
that
makes
sense:
okay,
no
I,
just
I,
couldn't
remember
if
we
stripped
our
our
binaries
or
not
like
you
say
it
makes
sense.
We
do
it
for
release
yeah.
B
A
Do
by
default
video,
unless
you
actually
instruct
the
compiler
that
I
need
the
debug
debug
information,
but
this
one
is
actually
built
compiled
in
debug
mode.
B
Okay
is
that
true
with
like,
if,
if
I
build
a
binary
from
our
pipeline,
it
leads
with
this
leaves
it
with
the
sybils
in
it's
only
during
the
release
phase
that
we
actually
strip
them.
A
No,
the
Debbies,
no,
there
is
no
to
the
best
of
my
knowledge.
There
is
no
City
box
symbol
in
the
binary
that
we
release,
so
the
binary
that
we
will.
B
End
up
no
no
I'm
saying
if
I,
if
I
run
a
pipeline,
if
I'm,
if
I'm
working
on
a
change
and
I
run
a
pipeline,
I
can
take
the
binary
off
of
that
pipeline
because
it
hasn't
gone
through
the
lease
stage.
Yet
it's
just
been
built.
B
B
A
That's
all
right,
I
mean
we
do
not
keep
that
one
that
one
is
is
not
kept
forever.
I
think
we
have
a
policy
I
need
to
double
check.
We
can't
have
a
policy
to
remove
the
artifacts
everyone.
B
A
But
but
there's
a
problem
with
that
that
binary
is
AMD
64
Linux,
so
we
cannot
really
run
it
on
your
Mac.
B
A
A
But
probably
the
easiest
way
to
get
the
debug
debuggable
binary
is
to
just
you
know,
compile
it
in
your
local
machine.
It
doesn't
really
take
that
long.
A
Probably
you
find
it
easier
to
compile
it
locally.
It's
fairly
straightforward.
The
gold
compiler
is.
Is
that
like
gccs,
it
is
as
long
as
you
have
the
dependencies.
A
Yeah
thanks
any
other
question.
I
I
think
I
I
have
to
just
create
a
follow-up
for
this
and
start
adding
some
of
these
to
the
developer.
Documentation
so
would
be
easier
for
everyone
to
just
use
it
and
leverage
it.
B
Do
you
you
have
to
worry
about
timeouts
or
you
know,
probes,
kicking
off
or
things
like
that,
while
you're
debugging
it
when.
A
You
are
when
you
are
debugging
with
f
test.
You
should
because
the
amp
test,
that's
the
structure
of
that's
the
way
that
we
wrote
the
test
cases.
A
A
Because
exactly
because
of
this,
if
you
look
at
this
line
of
code
it
it
uses
a
promise,
it
eventually
has
to
converge
to
a
condition.
So
we
use
we
use
Ginkgo
and
there
is
a
timeout
here.
A
So
when
you
are
testing
your
F
test,
your
local
API
server,
you
need
to
get
it
done,
beating
that
poll
inter
really
that
pull
time
out,
which
I
think
is
fairly.
A
Can
increase
that
if
you're
debugging,
but
for
the
cluster
itself?
No,
you
don't
have
you
don't
have
that
kind
of
time
out
really
because
of
the
recent
change
that
we
made
that
instead
of
waiting
blocking
the
weight,
we
just
postpone
and
come
back
to
it
that
basically
we
reach
you
the
request.
If
you
you
finish
what
you
are
debugging
in
this
cycle,
African
style
Loop,
you
will
end
up
doing
it
in
the
next,
so
we
basically
reach
you
instead
of
waiting
in
this
specific
time,
yeah
for
the
second
for
the
for
the
live
cluster.
A
A
A
A
Okay
thanks
everyone
for.