- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我几天前刚刚得到了 arudino,用于一个特定的项目,其中有四个伺服器,点击我的 3ds 上的八个按钮。我对编码完全陌生,需要帮助在我得到的编码中分配我的伺服系统和光电管。每次我尝试给出伺服系统所在位置的引脚编号时,我都会在其他地方收到错误。我已经尝试让它工作好几天了,所以任何建议都会很可爱!
#include <Servo.h>
// Define the slots (says digital ~PWM) on the Arduino where various parts of the machine will go
/* Diyode CodeShield Constants */
#define SERVO1 2 ); Servo attach ;2
#define SERVO2 3 ); Servo attach ;-3
#define SERVO3 4 ); Servo attach ;4
#define SERVO4 5 ); Servo attach ; -5
#define PIEZO 6 ); attach ; -6
#define BUTTON 9 ); attach 9
// Define a couple constants of length of time in milliseconds
#define CHECK_SCREEN_DELAY 150
#define WALKING_BUTTONPRESS_DURATION 3300
// Define a couple cases, don't mess with these
#define STARTING 1
#define WALKING 2
#define WATCHING 3
#define FOUND 4
//servo1 presses left and up
Servo servo1;
//servo2 presses right and down
;Servo servo2;
//servo3 presses b and y
Servo servo3;
//servo4 presses a and x
Servo servo4;
// Defines the starting positions of the servos.
// These will need to be adjusted during setup.
int servo1Flat = 108;
int servo1Deflect = 18;
int servo2Flat = 95;
int servo2Deflect = 20;
int servo3Flat = 83;
int servo3Deflect = 15;
int servo4Flat = 65;
int servo4Deflect = 15;
String name = "A";
//Define the photoreceptor.
int photocellPin = 1; // the cell and 10K pulldown are connected to a1
int photocellReading; // the analog reading from the sensor divider
//Define counts so the program knows when to collect, hatch, or deposit eggs.
unsigned int mode = 1;
unsigned int egg_count = 0;
unsigned int clutch_count = 0;
unsigned int box_count = 0;
unsigned int bike_count = 0;
//This is the level of light that the program uses to make decisions on whether to collect
//an egg or to hatch one.
unsigned char dark_threshold = 400;
//Setting up and writing in th servos. Don't mess with these.
void setup() {
Serial.begin (115200);
Serial.print("Start Unit ");
Serial.println(name);
servo1.attach(SERVO1);
servo1.write(servo1Flat);
servo2.attach(SERVO2);
servo2.write(servo2Flat);
servo3.attach(SERVO3);
servo3.write(servo3Flat);
servo4.attach(SERVO4);
servo4.write(servo4Flat);
}
void loop() {
switch (mode) {
case STARTING:
watchButton();
break;
case WALKING:
doWalking();
break;
case WATCHING:
break;
case FOUND:
watchButton();
break;
}
}
void watchButton() {
if (digitalRead(BUTTON) == HIGH) {
mode = WALKING;
}
}
int is_between(long val, long lower, long upper)
{
return (val > lower && val < upper);
}
//Define the actions to take when you've hatched all your eggs,
//i.e. go to the PC, deposit the eggs, come back outside and ask for
//another egg.
void tapScreen() {
// Go east and get off bike
if(clutch_count < 6)
{
servo2.write(servo2Flat + servo2Deflect);
delay(4000);
servo2.write(servo2Flat);
delay(100);
servo3.write(servo3Flat - 5*servo3Deflect);
delay(500);
servo3.write(servo3Flat);
delay(600);
//Walk into daycare center and over to pc
servo1.write(servo1Flat + servo1Deflect);
delay(300);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat - 2*servo1Deflect);
delay(3500);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(600);
servo1.write(servo1Flat - 2*servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
//Open PC, navigate to eggs
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(2200);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(2300);
//Deposit 5 eggs
servo2.write(servo2Flat + servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
//Exit out of PC and walk back outside, get on bike, ask for egg
servo4.write(servo4Flat + 4*servo4Deflect);
delay(400);
servo4.write(servo4Flat);
delay(2500);
servo1.write(servo1Flat + servo1Deflect);
delay(300);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(3000);
servo2.write(servo2Flat);
delay(1200);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(300);
servo3.write(servo3Flat - 5*servo3Deflect);
delay(500);
servo3.write(servo3Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(500);
servo2.write(servo2Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
clutch_count++;
}
//When the box is full, the program follows these commands, which are
//identical to the above except it changes the box and resets the clutch count.
else
{
servo2.write(servo2Flat + servo2Deflect);
delay(4000);
servo2.write(servo2Flat);
delay(100);
servo3.write(servo3Flat - 5*servo3Deflect);
delay(500);
servo3.write(servo3Flat);
delay(600);
//Walk into daycare center and over to pc
servo1.write(servo1Flat + servo1Deflect);
delay(300);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(200);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat - 2*servo1Deflect);
delay(3500);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(600);
servo1.write(servo1Flat - 2*servo1Deflect);
delay(300);
servo1.write(servo1Flat);
delay(600);
//Open PC, navigate to eggs
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(2200);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(2300);
//Change box, deposit 5 eggs
servo2.write(servo2Flat + servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(900);
servo2.write(servo2Flat + servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo2.write(servo2Flat + servo2Deflect);
delay(200);
servo2.write(servo2Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(700);
//Exit out of PC and walk back outside, get on bike, ask for egg
servo4.write(servo4Flat + 4*servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2500);
servo1.write(servo1Flat + servo1Deflect);
delay(300);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(3000);
servo2.write(servo2Flat);
delay(1200);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(300);
servo3.write(servo3Flat - 5*servo3Deflect);
delay(500);
servo3.write(servo3Flat);
delay(600);
servo2.write(servo2Flat + servo2Deflect);
delay(500);
servo2.write(servo2Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
clutch_count = 1;
box_count++;
Serial.print("***BOXES FILLED***: ");
Serial.println(box_count);
}
Serial.print("Clutches: ");
Serial.println(clutch_count);
bike_count = 0;
}
//Define the beep that will occur if the program messes up, which
//happens when the program rides back and forth on the bike 50 times without
//the screen darkening. The screen should always darken before riding back and
//forth 50 times due to an egg being accepted from the breeder or hatched.
void beep() {
analogWrite( PIEZO, 35);
delay(400);
digitalWrite(PIEZO, LOW);
}
void doWalking()
{
while(1)
{
photocellReading = analogRead(photocellPin);
//As I mentioned above the beep definition, when the program messes up,
//i.e. your character ends up in a place they shouldn't be and cannot
//collecting eggs, the program follows these commands. It will press "b" a bunch
//of times, then walk around a bit in case you are in the breeder's house,
//and then will use Talonflame to fly to in front of the Pokemon center. Then
//you will deposit any eggs/pokemon you might have (besides Talonflame), you will
// switch to a new box, and start over.
if(bike_count >= 50)
{
beep();
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(4000);
servo2.write(servo2Flat);
delay(200);
servo4.write(servo4Flat + 4*servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2500);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo1.write(servo1Flat + servo1Deflect);
delay(250);
servo1.write(servo1Flat);
delay(600);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(4000);
servo2.write(servo2Flat);
delay(200);
servo4.write(servo4Flat + 4*servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2500);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2000);
servo4.write(servo4Flat + 4*servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(5000);
servo4.write(servo4Flat + 4*servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2000);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(2000);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(1000);
servo2.write(servo2Flat - 4*servo2Deflect);
delay(300);
servo2.write(servo2Flat);
delay(1000);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(1000);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(1500);
servo4.write(servo4Flat - servo4Deflect);
delay(250);
servo4.write(servo4Flat);
delay(13000);
servo3.write(servo3Flat - 5*servo3Deflect);
delay(500);
servo3.write(servo3Flat);
delay(600);
clutch_count = 6;
beep();
tapScreen();
beep();
egg_count = 0;
bike_count = 0;
}
//If the screen is bright after asking for an egg and you have fewer than 5 eggs,
//the program bikes back and forth and asks for an egg.
else if(photocellReading > 350 && egg_count <5)
{
servo1.write(servo1Flat + servo1Deflect);
delay(WALKING_BUTTONPRESS_DURATION);
servo1.write(servo1Flat);
delay(50);
servo2.write(servo2Flat + servo2Deflect);
delay(3200);
servo2.write(servo2Flat);
delay(50);
servo1.write(servo1Flat + servo1Deflect);
delay(WALKING_BUTTONPRESS_DURATION);
servo1.write(servo1Flat);
delay(50);
servo2.write(servo2Flat + servo2Deflect);
delay(3500);
servo2.write(servo2Flat);
delay(100);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
bike_count++;
}
//Deposits eggs if you've hatched them all.
else if(egg_count >= 10)
{
tapScreen();
egg_count = 0;
}
//Focuses on hatching eggs after you've collected 5 eggs.
else if(photocellReading > 350 && egg_count >=5)
{
servo1.write(servo1Flat + servo1Deflect);
delay(3300);
servo1.write(servo1Flat);
delay(50);
servo2.write(servo2Flat + servo2Deflect);
delay(3300);
servo2.write(servo2Flat);
delay(50);
bike_count++;
}
//Hatches an egg when the screen goes dark after you've collected 5 eggs.
else if(photocellReading < 350 && egg_count >=5)
{
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(19000);
servo3.write(servo3Flat + servo3Deflect);
delay(400);
servo3.write(servo3Flat);
delay(3000);
egg_count++;
Serial.print("Eggs hatched: ");
Serial.println(egg_count - 5);
servo1.write(servo1Flat + servo1Deflect);
delay(800);
servo1.write(servo1Flat);
bike_count = 0;
}
//If you've collected fewer than five eggs and the screen is still dark after asking
//for an egg, the program will take the egg.
else if(photocellReading < 350 && egg_count < 5)
{
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(3000);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
servo4.write(servo4Flat - servo4Deflect);
delay(200);
servo4.write(servo4Flat);
delay(400);
egg_count++;
Serial.print("Eggs: ");
Serial.println(egg_count);
bike_count = 0;
}
int curr = analogRead(photocellPin);
}
}
最佳答案
我不知道你想在这里实现什么目标:
#define SERVO1 2 ); Servo attach ;2
#define SERVO2 3 ); Servo attach ;-3
#define SERVO3 4 ); Servo attach ;4
#define SERVO4 5 ); Servo attach ; -5
#define PIEZO 6 ); attach ; -6
#define BUTTON 9 ); attach 9
但是你得到的是,在 SERVO1
的每个地方出现在代码中,则替换为 2 ); Servo attach ;2
字符串。所以servo1.attach(SERVO1);
变成servo1.attach(2 ); Servo attach ;2);
这是无稽之谈。只需进行类似 #define SERVO1 2
的定义即可你应该没问题。
关于c++ - 在编码中分配 Helm 机很困难,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39866623/
有没有办法根据全局 values.yaml 有条件地安装 helm 子图?我将所有内部服务和组件都作为子图表,其中之一是消息队列图表。在我的开发和测试环境(本地 k8s)中,我使用 RabbitMQ,
我是 Helm 新手。 我在父图表中有一个默认值。我想默认在每个子图中使用这个值,但也有可能覆盖特定子图的值。 例子: # Parent-chart values.yaml global: sch
我正在使用 Helm chart 来部署大约 15 个微服务。有一个带有 requirements.yaml 的父 Helm chart 其中所有必需的微服务都列为依赖项。 sample requir
我正在为我的应用程序创建一个 Helm chart 。在模板目录中,我有一个包含这个的 config-map.yaml {{- with Values.xyz }} xyz.abc-def: {{ .
我已将图表发布到Chartmuseum。是的,我已经运行了“helm repo更新”。 $ helm search chartmuseum/ NAME C
我正在尝试找到一种方法来删除 Helm 中所有已部署的版本。 看来 Helm does not support删除所有版本,使用 --all否则。 是否有另一种方法可以在一个命令中删除所有 Helm
我想知道helm template --debug之间哪个最好 和 helm install --dry-run --debug 谢谢 最佳答案 两个命令的区别在于helm install --dry
我已经使用 helm 在我的 GKE 集群上部署了 jupyterhub。但是,当我运行 helm list --all(或 helm list --failed 等)时,我看不到任何输出。 我可以确
我正在尝试使用 OCI 注册表 (ACR) 来存储我的 helm 图表。我找到了推送和拉取图表的方法,但我无法以 OCI native 方式登录注册表。 目前我可以通过以下方式登录: az acr l
我正在使用 helm 图表(带有子图表)来部署我的应用程序。我正在使用值文件来设置值。 我正在寻找一种在我的值文件(或任何其他地方)中设置对我的值文件有效的变量的方法。 我的值文件中有一些部分(服务)
我有一个包含以下键/值对的值文件: domains: - name: "one.dev.beta.com" - name: "two.dev.beta.com" - name: "thre
我正在尝试在我的 helm 模板中提供一个条件,以使用 regexMatch 函数检查有效(或相当无效)的主机名。 这是我正在使用的代码行: {{- if regexMatch "(?:[0-9]{1
我有一个带有可选组件的 Helm chart 。似乎支持可选组件的首选方法是将它们分成单独的图表并用标签切换它们。 我试过了,但我的可选组件需要知道图表其余部分的变量(特定服务的地址)。这会导致事情破
我目前正在为多容器应用程序编写 Helm 图表。我们有一堆微服务容器(我们称它们为“应用程序”),它们在通过 K8s 处理的方式上非常相似,并且可以(因此应该)由相同的 Helm 模板处理以避免重复。
我正在安装 prometheus-redis-exporter Helm chart .其Deployment对象有一种注入(inject)注解的方法: # deployment.yaml ...
我无法摆脱这种状态:PENDING_INSTALL .这导致 terraform 无法部署。有没有办法不删除? # helm status core-api LAST DEPLOYED: Mon Ju
我正在寻找一种解决方案,将我的 values.yaml 中的列表转换为逗号分隔的列表。 值.yaml app: logfiletoexclude: - "/var/log/containe
我有一个 k8s 资源的通用模板,我想将其扩展 n 次(如果您好奇,这样我就可以创建 mongo 集群的 n 个成员,并且他们使用 statefulset 资源,以便每个成员都有一个稳定的网络姓名)。
我正在为 Web 服务开发一组 Helm 模板,该模板将整数 ID 作为其配置的一部分。该 Id 成为服务端点的一部分,编码为网络安全的 base64 字符集: 0=A 1=B 2=C ... 26=
我正在尝试将字典从一个 helm 模板传递到另一个 helm 模板,但它在被调用模板中解析为 null。 调用模板 - deployment.yaml 调用模板 - storageNodeAffini
我是一名优秀的程序员,十分优秀!